From: Marton Balint <cus@passwd.hu>
To: ffmpeg-devel@ffmpeg.org
Cc: Marton Balint <cus@passwd.hu>
Subject: [FFmpeg-devel] [PATCH 2/7] avformat/mov_chan: simplify channel layout canonicalization
Date: Sat, 9 Mar 2024 22:54:09 +0100
Message-ID: <20240309215414.26699-2-cus@passwd.hu> (raw)
In-Reply-To: <20240309215414.26699-1-cus@passwd.hu>
Signed-off-by: Marton Balint <cus@passwd.hu>
---
libavformat/mov_chan.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index 3e186b0837..ead3a9b91b 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -543,10 +543,8 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
ch_layout->u.map[i].id = mov_get_channel_id(label);
}
- ret = av_channel_layout_retype(ch_layout, AV_CHANNEL_ORDER_NATIVE, AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS);
- if (ret == AVERROR(ENOSYS))
- ret = av_channel_layout_retype(ch_layout, AV_CHANNEL_ORDER_UNSPEC, AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS);
- if (ret < 0 && ret != AVERROR(ENOSYS))
+ ret = av_channel_layout_retype(ch_layout, 0, AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL);
+ if (ret < 0)
goto out;
} else {
uint64_t mask = mov_get_channel_layout(layout_tag, bitmap);
@@ -843,10 +841,8 @@ int ff_mov_read_chnl(AVFormatContext *s, AVIOContext *pb, AVStream *st)
ch_layout->u.map[i].id = channel;
}
- ret = av_channel_layout_retype(ch_layout, AV_CHANNEL_ORDER_NATIVE, AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS);
- if (ret == AVERROR(ENOSYS))
- ret = av_channel_layout_retype(ch_layout, AV_CHANNEL_ORDER_UNSPEC, AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS);
- if (ret < 0 && ret != AVERROR(ENOSYS))
+ ret = av_channel_layout_retype(ch_layout, 0, AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL);
+ if (ret < 0)
return ret;
} else {
uint64_t omitted_channel_map = avio_rb64(pb);
--
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".
next prev parent reply other threads:[~2024-03-09 21:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 21:54 [FFmpeg-devel] [PATCH 1/7] avutil/channel_layout: add AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL Marton Balint
2024-03-09 21:54 ` Marton Balint [this message]
2024-03-09 21:54 ` [FFmpeg-devel] [PATCH 3/7] avutil/tests/channel_layout: make printing results part of the tests Marton Balint
2024-03-09 21:54 ` [FFmpeg-devel] [PATCH 4/7] avutil/tests/channel_layout: add some av_channel_from_string and av_channel_layout_from_string tests Marton Balint
2024-03-09 21:54 ` [FFmpeg-devel] [PATCH 5/7] avutil/channel_layout: factorize parsing list of channel names Marton Balint
2024-03-09 21:54 ` [FFmpeg-devel] [PATCH 6/7] avutil/channel_layout: fix some (un)initialization issues in av_channel_layout_from_string() Marton Balint
2024-03-09 21:54 ` [FFmpeg-devel] [PATCH 7/7] avutil/channel_layout: add specific text versions for unknown and unused channels Marton Balint
2024-03-16 8:34 ` [FFmpeg-devel] [PATCH 1/7] avutil/channel_layout: add AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL Marton Balint
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240309215414.26699-2-cus@passwd.hu \
--to=cus@passwd.hu \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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