aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cbs_apv.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2025-04-29 16:57:34 -0300
committerJames Almer <jamrial@gmail.com>2025-04-30 19:15:19 -0300
commite80f32f3bdd56b1b6dd13229bc026439b8efb9be (patch)
tree3a874d8e787f280bc6cd89b2f38740396cb12502 /libavcodec/cbs_apv.c
parenta8bae9b18d1c334bd027a7551eb1e9f170a40fc5 (diff)
downloadffmpeg-e80f32f3bdd56b1b6dd13229bc026439b8efb9be.tar.gz
avcodec/cbs_apv: don't return an error when reading empty buffers
The output will be a fragment with zero units, which is a lot more user friendly than making them think something went wrong, as it already happens with cbs_av1. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/cbs_apv.c')
-rw-r--r--libavcodec/cbs_apv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cbs_apv.c b/libavcodec/cbs_apv.c
index 2c4a1daaf0..e7dd04825c 100644
--- a/libavcodec/cbs_apv.c
+++ b/libavcodec/cbs_apv.c
@@ -168,8 +168,8 @@ static int cbs_apv_split_fragment(CodedBitstreamContext *ctx,
uint32_t signature;
int err, trace;
- if (header) {
- // Ignore extradata fragments.
+ if (header || !frag->data_size) {
+ // Ignore empty or extradata fragments.
return 0;
}