ffmpeg | branch: master | Timo Rothenpieler <t...@rothenpieler.org> | Sun Dec 22 03:06:17 2024 +0100| [770f0a243419f14a56f1da76b6cf44157565f98e] | committer: Timo Rothenpieler
avformat/flvdec: propagate av_packet_add_side_data failure > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=770f0a243419f14a56f1da76b6cf44157565f98e --- libavformat/flvdec.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 39e872f473..018249d1fe 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1721,20 +1721,22 @@ retry_duration: ret = av_packet_add_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, flv->new_extradata[stream_type], flv->new_extradata_size[stream_type]); - if (ret >= 0) { - flv->new_extradata[stream_type] = NULL; - flv->new_extradata_size[stream_type] = 0; - } + if (ret < 0) + return ret; + + flv->new_extradata[stream_type] = NULL; + flv->new_extradata_size[stream_type] = 0; } else if (multitrack && flv->mt_extradata_cnt > track_idx && flv->mt_extradata[track_idx]) { ret = av_packet_add_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, flv->mt_extradata[track_idx], flv->mt_extradata_sz[track_idx]); - if (ret >= 0) { - flv->mt_extradata[track_idx] = NULL; - flv->mt_extradata_sz[track_idx] = 0; - } + if (ret < 0) + return ret; + + flv->mt_extradata[track_idx] = NULL; + flv->mt_extradata_sz[track_idx] = 0; } if (stream_type == FLV_STREAM_TYPE_AUDIO && !enhanced_flv && (sample_rate != flv->last_sample_rate || _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".