gst/videorate/gstvideorate.c (gst_video_rate_flush_prev): Properly handle the case where you get EOS before any buffe...
Original commit message from CVS: 2006-04-04 Andy Wingo <wingo@pobox.com> * gst/videorate/gstvideorate.c (gst_video_rate_flush_prev): Properly handle the case where you get EOS before any buffers are received. Use gst_buffer_make_metadata_writable where appropriate.
This commit is contained in:
parent
76d5f5e214
commit
a0ffc95d5d
@ -1,5 +1,9 @@
|
|||||||
2006-04-04 Andy Wingo <wingo@pobox.com>
|
2006-04-04 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
|
* gst/videorate/gstvideorate.c (gst_video_rate_flush_prev):
|
||||||
|
Properly handle the case where you get EOS before any buffers are
|
||||||
|
received. Use gst_buffer_make_metadata_writable where appropriate.
|
||||||
|
|
||||||
* ext/theora/theoradec.c (theora_handle_data_packet): This value
|
* ext/theora/theoradec.c (theora_handle_data_packet): This value
|
||||||
is often negative -- make it signed so as not to wrap around.
|
is often negative -- make it signed so as not to wrap around.
|
||||||
Fixes segfaults introduced on 9 March.
|
Fixes segfaults introduced on 9 March.
|
||||||
|
@ -405,10 +405,11 @@ gst_video_rate_flush_prev (GstVideoRate * videorate)
|
|||||||
GstBuffer *outbuf;
|
GstBuffer *outbuf;
|
||||||
GstClockTime push_ts;
|
GstClockTime push_ts;
|
||||||
|
|
||||||
|
if (!videorate->prevbuf)
|
||||||
|
goto eos_before_buffers;
|
||||||
|
|
||||||
/* make sure we can write to the metadata */
|
/* make sure we can write to the metadata */
|
||||||
outbuf =
|
outbuf = gst_buffer_make_metadata_writable (videorate->prevbuf);
|
||||||
gst_buffer_create_sub (videorate->prevbuf, 0,
|
|
||||||
GST_BUFFER_SIZE (videorate->prevbuf));
|
|
||||||
|
|
||||||
/* this is the timestamp we put on the buffer */
|
/* this is the timestamp we put on the buffer */
|
||||||
push_ts = videorate->next_ts;
|
push_ts = videorate->next_ts;
|
||||||
@ -436,6 +437,12 @@ gst_video_rate_flush_prev (GstVideoRate * videorate)
|
|||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
/* WARNINGS */
|
||||||
|
eos_before_buffers:
|
||||||
|
{
|
||||||
|
GST_INFO_OBJECT (videorate, "got EOS before any buffer was received");
|
||||||
|
return GST_FLOW_OK;
|
||||||
|
}
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
push_error:
|
push_error:
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user