aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-05-22 22:44:56 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-05-26 03:37:09 +0200
commita5ff6ea32d9aafc3a8da9ce40c510a6858794c40 (patch)
treec91829c0bae4a257bab206e0e574d245b29d50d2
parent05a5e2b5761f4678dba2fdb77620855366e4fb09 (diff)
downloadffmpeg-a5ff6ea32d9aafc3a8da9ce40c510a6858794c40.tar.gz
avcodec/asvenc: Simplify writing extradata
It is confusing, because the AV_RL32("ASUS") already returns an endian-independent value, so converting it via av_le2ne32() makes no real sense: one would need to transform the native value to le and write it as a natie endian uint32_t for it to make sense (the current code only works because le2ne32 and ne2le32 are the same for both endianness that we care about). Or one can just use AV_RL32 and create the number via MKTAG(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/asvenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c
index 2f81d6c74b..bcdb5cfbe2 100644
--- a/libavcodec/asvenc.c
+++ b/libavcodec/asvenc.c
@@ -379,8 +379,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
if (!avctx->extradata)
return AVERROR(ENOMEM);
avctx->extradata_size = 8;
- AV_WLA(32, avctx->extradata, inv_qscale);
- ((uint32_t *) avctx->extradata)[1] = av_le2ne32(AV_RL32("ASUS"));
+ AV_WL32A(avctx->extradata, inv_qscale);
+ AV_WL32A(avctx->extradata + 4, MKTAG('A', 'S', 'U', 'S'));
for (i = 0; i < 64; i++) {
if (a->fdsp.fdct == ff_fdct_ifast) {