[FFmpeg-cvslog] avformat/flvenc: properly handle writing mpeg4 extradata
Timo Rothenpieler
git at videolan.org
Tue Jan 7 19:46:06 EET 2025
ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue Jan 7 18:30:23 2025 +0100| [b32a1a69a4db10c3d4a3b437b4fae23a2775005b] | committer: Timo Rothenpieler
avformat/flvenc: properly handle writing mpeg4 extradata
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b32a1a69a4db10c3d4a3b437b4fae23a2775005b
---
libavformat/flvenc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index f3f32dc433..df429836df 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -881,8 +881,12 @@ static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* par, i
ff_isom_write_av1c(pb, par->extradata, par->extradata_size, 1);
else if (par->codec_id == AV_CODEC_ID_VP9)
ff_isom_write_vpcc(s, pb, par->extradata, par->extradata_size, par);
- else
+ else if (par->codec_id == AV_CODEC_ID_H264)
ff_isom_write_avcc(pb, par->extradata, par->extradata_size);
+ else if (par->codec_id == AV_CODEC_ID_MPEG4)
+ avio_write(pb, par->extradata, par->extradata_size);
+ else
+ av_assert0(0);
}
data_size = avio_tell(pb) - pos;
avio_seek(pb, -data_size - 10, SEEK_CUR);
More information about the ffmpeg-cvslog
mailing list