This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch release/7.0
in repository ffmpeg.
The following commit(s) were added to refs/heads/release/7.0 by this push:
new e97ec63a92 avformat/mov_chan: free temporary layout on error paths
e97ec63a92 is described below
commit e97ec63a92a136d72842285c3e4c1f25eccb35fb
Author: Zhao Zhili <[email protected]>
AuthorDate: Mon Jun 15 22:23:45 2026 +0800
Commit: Marvin Scholz <[email protected]>
CommitDate: Tue Nov 17 13:49:45 2026 +0000
avformat/mov_chan: free temporary layout on error paths
(cherry picked from commit 974a75798a53736067008d3dd4cad97d167ca0db)
Signed-off-by: Marvin Scholz <[email protected]>
---
libavformat/mov_chan.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index 2f3e2df1b8..37bf315b40 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -323,8 +323,10 @@ static int mov_get_channel_layout(AVChannelLayout
*ch_layout, uint32_t tag)
}
ret = av_channel_layout_retype(&tmp, 0,
AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL);
- if (ret < 0)
+ if (ret < 0) {
+ av_channel_layout_uninit(&tmp);
return ret;
+ }
av_channel_layout_uninit(ch_layout);
*ch_layout = tmp;
@@ -497,6 +499,7 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb,
AVStream *st,
if (pb->eof_reached) {
av_log(s, AV_LOG_ERROR,
"reached EOF while reading channel layout\n");
+ av_channel_layout_uninit(&tmp);
return AVERROR_INVALIDDATA;
}
label = avio_rb32(pb); // mChannelLabel
@@ -509,8 +512,10 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb,
AVStream *st,
}
ret = av_channel_layout_retype(&tmp, 0,
AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL);
- if (ret < 0)
+ if (ret < 0) {
+ av_channel_layout_uninit(&tmp);
goto out;
+ }
av_channel_layout_uninit(ch_layout);
*ch_layout = tmp;
@@ -820,8 +825,10 @@ int ff_mov_read_chnl(AVFormatContext *s, AVIOContext *pb,
AVStream *st)
}
ret = av_channel_layout_retype(&tmp, 0,
AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL);
- if (ret < 0)
+ if (ret < 0) {
+ av_channel_layout_uninit(&tmp);
return ret;
+ }
av_channel_layout_uninit(ch_layout);
*ch_layout = tmp;
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]