Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Anthony Lemieux <pal@palemieux.com>2022-03-11 20:16:47 +0300
committerZane van Iperen <zane@zanevaniperen.com>2022-03-19 14:33:48 +0300
commit9ca4d80d6b85ed1e8922c6977ff1f26ce7f19ea1 (patch)
tree96d9d03d452eae09a64a4e20535e499c645dd881 /libavformat/imfdec.c
parentf8dc89b34d2ccdb59747178475ea6910a11515c4 (diff)
avformat/imf: relocate static function imf_time_to_ts()
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Diffstat (limited to 'libavformat/imfdec.c')
-rw-r--r--libavformat/imfdec.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index 9ec52efbc8..e2a699dde7 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -154,6 +154,25 @@ static int imf_uri_is_dos_abs_path(const char *string)
return 0;
}
+static int imf_time_to_ts(int64_t *ts, AVRational t, AVRational time_base)
+{
+ int dst_num;
+ int dst_den;
+ AVRational r;
+
+ r = av_div_q(t, time_base);
+
+ if ((av_reduce(&dst_num, &dst_den, r.num, r.den, INT64_MAX) != 1))
+ return 1;
+
+ if (dst_den != 1)
+ return 1;
+
+ *ts = dst_num;
+
+ return 0;
+}
+
/**
* Parse a ASSETMAP XML file to extract the UUID-URI mapping of assets.
* @param s the current format context, if any (can be NULL).
@@ -772,25 +791,6 @@ static int get_resource_context_for_timestamp(AVFormatContext *s, IMFVirtualTrac
return AVERROR_STREAM_NOT_FOUND;
}
-static int imf_time_to_ts(int64_t *ts, AVRational t, AVRational time_base)
-{
- int dst_num;
- int dst_den;
- AVRational r;
-
- r = av_div_q(t, time_base);
-
- if ((av_reduce(&dst_num, &dst_den, r.num, r.den, INT64_MAX) != 1))
- return 1;
-
- if (dst_den != 1)
- return 1;
-
- *ts = dst_num;
-
- return 0;
-}
-
static int imf_read_packet(AVFormatContext *s, AVPacket *pkt)
{
IMFVirtualTrackResourcePlaybackCtx *resource = NULL;