From: <wi...@ke...> - 2006-04-04 11:15:16
|
CVS Root: /cvs/gstreamer Module: gst-plugins-base Changes by: wingo Date: Tue Apr 04 2006 11:15:13 UTC Log message: 2006-04-04 Andy Wingo <wi...@po...> * 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. Modified files: . : ChangeLog gst/videorate : gstvideorate.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.2531&r2=1.2532 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/videorate/gstvideorate.c.diff?r1=1.34&r2=1.35 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v retrieving revision 1.2531 retrieving revision 1.2532 diff -u -d -r1.2531 -r1.2532 --- ChangeLog 4 Apr 2006 10:16:46 -0000 1.2531 +++ ChangeLog 4 Apr 2006 11:15:00 -0000 1.2532 @@ -1,5 +1,9 @@ 2006-04-04 Andy Wingo <wi...@po...> + * 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 is often negative -- make it signed so as not to wrap around. Fixes segfaults introduced on 9 March. Index: gstvideorate.c RCS file: /cvs/gstreamer/gst-plugins-base/gst/videorate/gstvideorate.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- gstvideorate.c 2 Mar 2006 17:46:36 -0000 1.34 +++ gstvideorate.c 4 Apr 2006 11:15:00 -0000 1.35 @@ -405,10 +405,11 @@ GstBuffer *outbuf; GstClockTime push_ts; + if (!videorate->prevbuf) + goto eos_before_buffers; /* make sure we can write to the metadata */ - outbuf = - gst_buffer_create_sub (videorate->prevbuf, 0, - GST_BUFFER_SIZE (videorate->prevbuf)); + outbuf = gst_buffer_make_metadata_writable (videorate->prevbuf); /* this is the timestamp we put on the buffer */ push_ts = videorate->next_ts; @@ -436,6 +437,12 @@ return res; + /* WARNINGS */ +eos_before_buffers: + { + GST_INFO_OBJECT (videorate, "got EOS before any buffer was received"); + return GST_FLOW_OK; + } /* ERRORS */ push_error: { |