diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-10-22 12:59:02 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-10-22 13:05:16 +0200 |
commit | cc2a6e493bdc93cb23e71a5d519087aa4a648357 (patch) | |
tree | 02494b2ed60f57bffe612d7e67974b6856d7639b | |
parent | 07ce1d190617fb099956849a4145825d398d4f06 (diff) |
ffdec: be more careful with DTS timestamp interpolation
Don't use -1 and 0 duration buffers to calculate next output timestamp as they
are very likely wrong.
Fixes #632877
-rw-r--r-- | ext/ffmpeg/gstffmpegdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index db1364c..b959598 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -1903,8 +1903,10 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec, } GST_BUFFER_DURATION (*outbuf) = out_duration; - if (out_timestamp != -1 && out_duration != -1) + if (out_timestamp != -1 && out_duration != -1 && out_duration != 0) ffmpegdec->next_out = out_timestamp + out_duration; + else + ffmpegdec->next_out = -1; /* palette is not part of raw video frame in gst and the size * of the outgoing buffer needs to be adjusted accordingly */ |