[FFmpeg-cvslog] avformat/amr: Fix writing AMR header

Andreas Rheinhardt git at videolan.org
Sat Jan 8 19:42:13 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Jan  6 11:45:29 2022 +0100| [a22a71eb2c633335a037983fda0badc1863fc529] | committer: Andreas Rheinhardt

avformat/amr: Fix writing AMR header

Regression since f282c34c009e3653ec160c3880e64fc1a9300d0e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a22a71eb2c633335a037983fda0badc1863fc529
---

 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;
     }



More information about the ffmpeg-cvslog mailing list