Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/5] avformat/mov_chan: do not assume channels are in native order
@ 2024-01-29 23:27 Marton Balint
  2024-01-29 23:27 ` [FFmpeg-devel] [PATCH 2/5] avformat/mov_chan: never override number of channels based on chan atom Marton Balint
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Marton Balint @ 2024-01-29 23:27 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Marton Balint

Existing code could have caused wrong channel order signalling or reduced
channel count if a channel designation appeared multiple times. This is
actually an old bug, but the conversion to the new channel layout API made it
visible, because now the code overrides the proper channel count with the one
calculated from the mask.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/mov_chan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index f3d51899e1..5cb2de3820 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -530,7 +530,7 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
         size -= 20;
         if (layout_tag == 0) {
             uint64_t mask_incr = mov_get_channel_mask(label);
-            if (mask_incr == 0) {
+            if (mask_incr == 0 || mask_incr <= label_mask) {
                 label_mask = 0;
                 break;
             }
-- 
2.35.3

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-02-11 23:03 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 23:27 [FFmpeg-devel] [PATCH 1/5] avformat/mov_chan: do not assume channels are in native order Marton Balint
2024-01-29 23:27 ` [FFmpeg-devel] [PATCH 2/5] avformat/mov_chan: never override number of channels based on chan atom Marton Balint
2024-01-29 23:27 ` [FFmpeg-devel] [PATCH 3/5] avutil/channel_layout: add av_channel_layout_from_custom() Marton Balint
2024-02-01  8:56   ` Anton Khirnov
2024-02-01 20:01     ` Marton Balint
2024-02-02  4:42       ` Anton Khirnov
2024-01-29 23:27 ` [FFmpeg-devel] [PATCH 4/5] avutil/channel_layout: add av_channel_layout_retype() Marton Balint
2024-01-31 23:01   ` [FFmpeg-devel] [PATCH v2 " Marton Balint
2024-02-01  9:02     ` Anton Khirnov
2024-02-01 20:36       ` Marton Balint
2024-02-03 16:19         ` Anton Khirnov
2024-02-02 12:56   ` [FFmpeg-devel] [PATCH " James Almer
2024-02-03 10:38     ` Anton Khirnov
2024-02-03 13:24       ` James Almer
2024-02-04 19:28         ` [FFmpeg-devel] [PATCH v2 3/5] avutil/channel_layout: add av_channel_layout_custom_init() Marton Balint
2024-02-04 19:28           ` [FFmpeg-devel] [PATCH v2 4/5] avutil/channel_layout: add av_channel_layout_retype() Marton Balint
2024-02-09 15:10             ` Anton Khirnov
2024-02-11 22:38               ` Marton Balint
2024-02-11 22:51             ` James Almer
2024-02-11 23:03               ` Marton Balint
2024-02-04 19:28           ` [FFmpeg-devel] [PATCH v2 5/5] avformat/mov_chan: add support for reading custom channel layouts when layout_tag == 0 Marton Balint
2024-02-08 20:16             ` [FFmpeg-devel] [PATCH v3 " Marton Balint
2024-01-29 23:27 ` [FFmpeg-devel] [PATCH " Marton Balint
2024-02-08 19:25 ` [FFmpeg-devel] [PATCH 1/5] avformat/mov_chan: do not assume channels are in native order Marton Balint

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git