[FFmpeg-cvslog] avformat/imf: Fix error handling in set_context_streams_from_tracks()

Pierre-Anthony Lemieux git at videolan.org
Tue Jan 4 15:27:18 EET 2022


ffmpeg | branch: release/5.0 | Pierre-Anthony Lemieux <pal at palemieux.com> | Sun Jan  2 09:22:26 2022 -0800| [4c03928f4db4dab5ebed91c281e67f678cd3349d] | committer: Zane van Iperen

avformat/imf: Fix error handling in set_context_streams_from_tracks()

Signed-off-by: Pierre-Anthony Lemieux <pal at palemieux.com>
Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c03928f4db4dab5ebed91c281e67f678cd3349d
---

 libavformat/imfdec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index 228ba494ae..503c8a2659 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -564,9 +564,8 @@ static int set_context_streams_from_tracks(AVFormatContext *s)
         /* Copy stream information */
         asset_stream = avformat_new_stream(s, NULL);
         if (!asset_stream) {
-            ret = AVERROR(ENOMEM);
             av_log(s, AV_LOG_ERROR, "Could not create stream\n");
-            break;
+            return AVERROR(ENOMEM);
         }
         asset_stream->id = i;
         ret = avcodec_parameters_copy(asset_stream->codecpar, first_resource_stream->codecpar);



More information about the ffmpeg-cvslog mailing list