[FFmpeg-cvslog] avformat/flvenc: fix stereo flag when writing PCMA/PCMU
Alessandro Ros
git at videolan.org
Sun Feb 4 21:35:35 EET 2024
ffmpeg | branch: master | Alessandro Ros <aler9.dev at gmail.com> | Sun Jan 21 16:16:20 2024 +0100| [49ab7f8997659b7d7140b54d814234e302843434] | committer: Marton Balint
avformat/flvenc: fix stereo flag when writing PCMA/PCMU
Currently, when writing PCMA or PCMU tracks with FLV or RTMP, the
stereo flag and sample rate flag inside RTMP audio messages are
overridden, making impossible to distinguish between mono and stereo
tracks. This patch fixes the issue by restoring the same flag mechanism
of all other codecs, that takes into consideration the right channel
count and sample rate.
Signed-off-by: Alessandro Ros <aler9.dev at gmail.com>
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49ab7f8997659b7d7140b54d814234e302843434
---
libavformat/flvenc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 874560fac1..772d891136 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -208,10 +208,10 @@ error:
flags |= FLV_CODECID_NELLYMOSER | FLV_SAMPLESSIZE_16BIT;
break;
case AV_CODEC_ID_PCM_MULAW:
- flags = FLV_CODECID_PCM_MULAW | FLV_SAMPLERATE_SPECIAL | FLV_SAMPLESSIZE_16BIT;
+ flags |= FLV_CODECID_PCM_MULAW | FLV_SAMPLESSIZE_16BIT;
break;
case AV_CODEC_ID_PCM_ALAW:
- flags = FLV_CODECID_PCM_ALAW | FLV_SAMPLERATE_SPECIAL | FLV_SAMPLESSIZE_16BIT;
+ flags |= FLV_CODECID_PCM_ALAW | FLV_SAMPLESSIZE_16BIT;
break;
case 0:
flags |= par->codec_tag << 4;
More information about the ffmpeg-cvslog
mailing list