diff --git a/ChangeLog b/ChangeLog index 83a84862ca..b3d396e91e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-07-25 Julien MOUTTE + + * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_video_frame): + * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop): Handle + buffers with invalid duration correctly even in the case where + we have a demuxer AND a decoder from ffmpeg linked. + Fixes: #460274. + 2007-07-13 Jan Schmidt * configure.ac: diff --git a/common b/common index 5167bced49..b3fe2a25c1 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 5167bced491ffe62251c62d6c5e7b9a7541e97e5 +Subproject commit b3fe2a25c1cd0f4b021795d0db7330aeb338da7c diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 82fc79d7bc..e25253f7f7 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -1397,7 +1397,9 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec, */ if (!GST_CLOCK_TIME_IS_VALID (in_duration)) { /* if we have an input framerate, use that */ - if (ffmpegdec->format.video.fps_n != -1) { + if (ffmpegdec->format.video.fps_n != -1 && + (ffmpegdec->format.video.fps_n != 1000 && + ffmpegdec->format.video.fps_d != 1)) { GST_LOG_OBJECT (ffmpegdec, "using input framerate for duration"); in_duration = gst_util_uint64_scale_int (GST_SECOND, ffmpegdec->format.video.fps_d, ffmpegdec->format.video.fps_n); diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c index 4fdb9acf04..0003a5ef63 100644 --- a/ext/ffmpeg/gstffmpegdemux.c +++ b/ext/ffmpeg/gstffmpegdemux.c @@ -1194,6 +1194,11 @@ gst_ffmpegdemux_loop (GstPad * pad) stream->last_ts = timestamp; } duration = gst_ffmpeg_time_ff_to_gst (pkt.duration, avstream->time_base); + if (G_UNLIKELY (!duration)) { + GST_WARNING_OBJECT (demux, "invalid buffer duration, setting to NONE"); + duration = GST_CLOCK_TIME_NONE; + } + GST_DEBUG_OBJECT (demux, "pkt pts:%" GST_TIME_FORMAT