Browse Source

avformat/mov: Simplify get_stream_info_time()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.2
Michael Niedermayer 7 years ago
parent
commit
21f4b456f1
1 changed files with 6 additions and 10 deletions
  1. +6
    -10
      libavformat/mov.c

+ 6
- 10
libavformat/mov.c View File

@@ -1234,16 +1234,12 @@ static int search_frag_moof_offset(MOVFragmentIndex *frag_index, int64_t offset)

static int64_t get_stream_info_time(MOVFragmentStreamInfo * frag_stream_info)
{

if (frag_stream_info) {
if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE)
return frag_stream_info->sidx_pts;
if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE)
return frag_stream_info->first_tfra_pts;
if (frag_stream_info->tfdt_dts != AV_NOPTS_VALUE)
return frag_stream_info->tfdt_dts;
}
return AV_NOPTS_VALUE;
av_assert0(frag_stream_info);
if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE)
return frag_stream_info->sidx_pts;
if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE)
return frag_stream_info->first_tfra_pts;
return frag_stream_info->tfdt_dts;
}

static int64_t get_frag_time(MOVFragmentIndex *frag_index,


Loading…
Cancel
Save