Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH v4 1/7] avformat/imf: relocate static function imf_time_to_ts()
@ 2022-03-11 17:16 pal
  2022-03-11 17:16 ` [FFmpeg-devel] [PATCH v4 2/7] avformat/imf: add support for input seeking pal
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pal @ 2022-03-11 17:16 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Pierre-Anthony Lemieux

From: Pierre-Anthony Lemieux <pal@palemieux.com>

---
 libavformat/imfdec.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index 3ce850b75a..b98af020d2 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;
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-12  2:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 17:16 [FFmpeg-devel] [PATCH v4 1/7] avformat/imf: relocate static function imf_time_to_ts() pal
2022-03-11 17:16 ` [FFmpeg-devel] [PATCH v4 2/7] avformat/imf: add support for input seeking pal
2022-03-11 17:16 ` [FFmpeg-devel] [PATCH v4 3/7] avformat/imf: clean-up and reduce logging pal
2022-03-11 17:16 ` [FFmpeg-devel] [PATCH v4 4/7] avformat/seek: add ff_rescale_interval() function pal
2022-03-11 17:16 ` [FFmpeg-devel] [PATCH v4 5/7] avformat/tests: add test for ff_rescale_interval() pal
2022-03-11 17:16 ` [FFmpeg-devel] [PATCH v4 6/7] avformat/imf: refactor to use ff_rescale_interval() pal
2022-03-11 17:16 ` [FFmpeg-devel] [PATCH v4 7/7] avformat/concat: " pal
2022-03-12  2:36 ` [FFmpeg-devel] [PATCH v4 1/7] avformat/imf: relocate static function imf_time_to_ts() Zane van Iperen

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git