aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-12-07 21:38:25 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-12-19 20:09:03 +0100
commit21f4b456f1ffeaaaa2c4e8ee940f41a569ae6979 (patch)
treeff44288a4dcc13b5b0398a11d24f1550b4060396
parent68e011e4103b9cb5ac2d152d73ca8393065a33fb (diff)
downloadffmpeg-21f4b456f1ffeaaaa2c4e8ee940f41a569ae6979.tar.gz
avformat/mov: Simplify get_stream_info_time()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mov.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index fb95fd2fef..ec839ed5e3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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,