Created
March 24, 2019 15:13
-
-
Save tmm1/002096d61886fb7f58830455870104ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From db6f249e3d95b124c388f26e39f95b855b15dcdf Mon Sep 17 00:00:00 2001 | |
From: Aman Gupta <[email protected]> | |
Date: Fri, 22 Mar 2019 17:54:38 -0700 | |
Subject: [PATCH] avformat/utils: add hack to allow read seeks via io context | |
Signed-off-by: Aman Gupta <[email protected]> | |
--- | |
libavformat/utils.c | 3 +++ | |
1 file changed, 3 insertions(+) | |
diff --git a/libavformat/utils.c b/libavformat/utils.c | |
index e5b85a31d9..05dc75c4ec 100644 | |
--- a/libavformat/utils.c | |
+++ b/libavformat/utils.c | |
@@ -2486,6 +2486,9 @@ static int seek_frame_internal(AVFormatContext *s, int stream_index, | |
if (s->iformat->read_seek) { | |
ff_read_frame_flush(s); | |
ret = s->iformat->read_seek(s, stream_index, timestamp, flags); | |
+ } else if (s->pb->read_seek) { | |
+ ff_read_frame_flush(s); | |
+ ret = s->pb->read_seek(s->pb->opaque, stream_index, timestamp, flags); | |
} else | |
ret = -1; | |
if (ret >= 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment