[FFmpeg-devel] [PATCH 4/4] avformat/amr: Fix writing AMR header

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Jan 6 12:52:26 EET 2022


Regression since f282c34c009e3653ec160c3880e64fc1a9300d0e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
Will add FATE-remux tests for the muxer later.

 libavformat/amr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/amr.c b/libavformat/amr.c
index 8e14052200..40d5bc9cc5 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -54,9 +54,9 @@ static int amr_write_header(AVFormatContext *s)
     AVCodecParameters *par = s->streams[0]->codecpar;
 
     if (par->codec_id == AV_CODEC_ID_AMR_NB) {
-        avio_write(pb, AMR_header,   sizeof(AMR_header)   - 1); /* magic number */
+        avio_write(pb, AMR_header,   sizeof(AMR_header));   /* magic number */
     } else if (par->codec_id == AV_CODEC_ID_AMR_WB) {
-        avio_write(pb, AMRWB_header, sizeof(AMRWB_header) - 1); /* magic number */
+        avio_write(pb, AMRWB_header, sizeof(AMRWB_header)); /* magic number */
     } else {
         return -1;
     }
-- 
2.32.0



More information about the ffmpeg-devel mailing list