Commit 21f4b456 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mov: Simplify get_stream_info_time()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 68e011e4
...@@ -1234,16 +1234,12 @@ static int search_frag_moof_offset(MOVFragmentIndex *frag_index, int64_t offset) ...@@ -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) static int64_t get_stream_info_time(MOVFragmentStreamInfo * frag_stream_info)
{ {
av_assert0(frag_stream_info);
if (frag_stream_info) { if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE)
if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE) return frag_stream_info->sidx_pts;
return frag_stream_info->sidx_pts; if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE)
if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE) return frag_stream_info->first_tfra_pts;
return frag_stream_info->first_tfra_pts; return frag_stream_info->tfdt_dts;
if (frag_stream_info->tfdt_dts != AV_NOPTS_VALUE)
return frag_stream_info->tfdt_dts;
}
return AV_NOPTS_VALUE;
} }
static int64_t get_frag_time(MOVFragmentIndex *frag_index, static int64_t get_frag_time(MOVFragmentIndex *frag_index,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment