[FFmpeg-trac] #6810(avformat:new): Wrong DTS guess when PTS is reordered for the input without DTS (wrong 'Non-monotonous DTS' fixup)
FFmpeg
trac at avcodec.org
Thu Nov 9 22:40:01 EET 2017
#6810: Wrong DTS guess when PTS is reordered for the input without DTS (wrong
'Non-monotonous DTS' fixup)
------------------------------------+------------------------------------
Reporter: perexg | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: mkv dts | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by perexg):
A better patch is:
{{{
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 35dcabd611..04b10656e0 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1287,6 +1287,7 @@ static int h264_select_output_frame(H264Context *h)
h->mmco_reset = 0;
if (sps->bitstream_restriction_flag ||
+ sps->ref_frame_count ||
h->avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT) {
h->avctx->has_b_frames = FFMAX(h->avctx->has_b_frames,
sps->num_reorder_frames);
}
}}}
I sent this code to the ffmpeg-devel mailing list.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6810#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list