avformat/imf: Fix error handling in set_context_streams_from_tracks()

Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
This commit is contained in:
Pierre-Anthony Lemieux 2022-01-02 09:22:26 -08:00 committed by Zane van Iperen
parent 029598bd4a
commit 4c03928f4d
No known key found for this signature in database
GPG Key ID: 68616B2D8AC4DCC5
1 changed files with 1 additions and 2 deletions

View File

@ -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);