mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
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.
This commit is contained in:
parent
489e66f5d5
commit
4c6045a04f
4 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
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:
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue