[FFmpeg-devel] [PATCH v3 2/4] avformat/imf: fix missing error reporting when opening resources

pal at sandflow.com pal at sandflow.com
Thu Feb 3 06:07:43 EET 2022


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

---
 libavformat/imfdec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index e6a1020ecc..658ddc40f2 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -550,7 +550,9 @@ static int set_context_streams_from_tracks(AVFormatContext *s)
         AVStream *first_resource_stream;
 
         /* Open the first resource of the track to get stream information */
-        open_track_resource_context(s, &c->tracks[i]->resources[0]);
+        ret = open_track_resource_context(s, &c->tracks[i]->resources[0]);
+        if (ret)
+            return ret;
         first_resource_stream = c->tracks[i]->resources[0].ctx->streams[0];
         av_log(s, AV_LOG_DEBUG, "Open the first resource of track %d\n", c->tracks[i]->index);
 
-- 
2.17.1



More information about the ffmpeg-devel mailing list