diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-14 20:34:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-14 20:51:10 +0100 |
commit | 480af3a35ce3735c197917b3f1547eacd517aceb (patch) | |
tree | 9b44398208f3390fe35f35834c67f96eebd1cab8 /libavformat/utils.c | |
parent | 68a959cb271767d65a7f0e382e518d8270588308 (diff) | |
download | ffmpeg-480af3a35ce3735c197917b3f1547eacd517aceb.tar.gz |
avformat/utils: skip the MPEG-2 style dts/pts code for HEVC
This extends the exception from H264 to H264 + HEVC
Fixes Ticket3385
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 5cb7561a7b..e859ad21c7 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1154,7 +1154,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, /* Interpolate PTS and DTS if they are not present. We skip H264 * currently because delay and has_b_frames are not reliably set. */ if ((delay == 0 || (delay == 1 && pc)) && - st->codec->codec_id != AV_CODEC_ID_H264) { + st->codec->codec_id != AV_CODEC_ID_H264 && + st->codec->codec_id != AV_CODEC_ID_HEVC) { if (presentation_delayed) { /* DTS = decompression timestamp */ /* PTS = presentation timestamp */ @@ -1199,7 +1200,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, pkt->dts = st->pts_buffer[0]; } // We skipped it above so we try here. - if (st->codec->codec_id == AV_CODEC_ID_H264) + if (st->codec->codec_id == AV_CODEC_ID_H264 || + st->codec->codec_id == AV_CODEC_ID_HEVC) // This should happen on the first packet update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts, pkt); if (pkt->dts > st->cur_dts) |