Commit 4c6045a0 authored by Julien Moutte Moutte's avatar Julien Moutte Moutte

ext/ffmpeg/: Handle buffers with invalid duration correctly even in the case...

ext/ffmpeg/: Handle buffers with invalid duration correctly even in the case where we have a demuxer AND a decoder fr...

Original commit message from CVS:
2007-07-25  Julien MOUTTE  <julien@moutte.net>

* 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.
parent 489e66f5
2007-07-25 Julien MOUTTE <julien@moutte.net>
* 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 <thaytan@mad.scientist.com>
* configure.ac:
......
common @ b3fe2a25
Subproject commit 5167bced491ffe62251c62d6c5e7b9a7541e97e5
Subproject commit b3fe2a25c1cd0f4b021795d0db7330aeb338da7c
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment