On 15/02/14 07:53, Anton Khirnov wrote:
> 
> On Fri, 14 Feb 2014 21:58:36 +0100, Luca Barbato <[email protected]> wrote:
>> From: Michael Niedermayer <[email protected]>
>>
>> Skip the MPEG-2 style timestamp guessing code.
>>
>> Signed-off-by: Luca Barbato <[email protected]>
>> ---
>>  libavformat/utils.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavformat/utils.c b/libavformat/utils.c
>> index fca588b..1845b21 100644
>> --- a/libavformat/utils.c
>> +++ b/libavformat/utils.c
>> @@ -812,7 +812,8 @@ static void compute_pkt_fields(AVFormatContext *s, 
>> AVStream *st,
>>      /* Interpolate PTS and DTS if they are not present. We skip H.264
>>       * 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 */
>> @@ -873,7 +874,8 @@ static void compute_pkt_fields(AVFormatContext *s, 
>> AVStream *st,
>>          if (pkt->dts == AV_NOPTS_VALUE)
>>              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);
>>          if (pkt->dts > st->cur_dts)
>> -- 
>> 1.8.5.1
>>
> 
> I guess ok, until this crap can be purged completely.
> 

Wait, the patch seems to break fate... Guillaume, did you try it?

lu

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to