[FFmpeg-cvslog] avformat/dashdec: check return code of avcodec_parameters_copy()
Marth64
git at videolan.org
Sun Oct 13 18:08:40 EEST 2024
ffmpeg | branch: master | Marth64 <marth64 at proxyid.net> | Fri Oct 11 02:06:36 2024 -0500| [7acc2ebd5d9e09198ea235870f8e6a9a5de667f8] | committer: Steven Liu
avformat/dashdec: check return code of avcodec_parameters_copy()
Signed-off-by: Marth64 <marth64 at proxyid.net>
Reviewed-by: Steven Liu <lq at chinaffmpeg.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7acc2ebd5d9e09198ea235870f8e6a9a5de667f8
---
libavformat/dashdec.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 9ce23aec65..cd1b3da3a2 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1949,7 +1949,11 @@ static int open_demux_for_component(AVFormatContext *s, struct representation *p
return AVERROR(ENOMEM);
st->id = i;
- avcodec_parameters_copy(st->codecpar, ist->codecpar);
+
+ ret = avcodec_parameters_copy(st->codecpar, ist->codecpar);
+ if (ret < 0)
+ return ret;
+
avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den);
// copy disposition
More information about the ffmpeg-cvslog
mailing list