summaryrefslogtreecommitdiff
path: root/libavcodec/hapqa_extract_bsf.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-03-13 19:06:45 -0300
committerJames Almer <jamrial@gmail.com>2018-03-13 20:49:50 -0300
commitb173e035362b103e17cc7b394c231c60a4915c59 (patch)
tree2540d61fd6bcfa69f53376d86ca3fea7c686609e /libavcodec/hapqa_extract_bsf.c
parent2b6699f024ae9968244d02d3c81e57737d603b62 (diff)
downloadffmpeg-b173e035362b103e17cc7b394c231c60a4915c59.tar.gz
avcodec/hapqa_extract: fix two error return values
ret is 0 by default. Reviewed-by: Martin Vignali <martin.vignali@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hapqa_extract_bsf.c')
-rw-r--r--libavcodec/hapqa_extract_bsf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/hapqa_extract_bsf.c b/libavcodec/hapqa_extract_bsf.c
index 333efb2e3a..ee5dc191f7 100644
--- a/libavcodec/hapqa_extract_bsf.c
+++ b/libavcodec/hapqa_extract_bsf.c
@@ -66,6 +66,7 @@ static int hapqa_extract(AVBSFContext *bsf, AVPacket *pkt)
if ((section_type & 0x0F) != 0x0D) {
av_log(bsf, AV_LOG_ERROR, "Invalid section type for HAPQA %#04x.\n", section_type & 0x0F);
+ ret = AVERROR_INVALIDDATA;
goto fail;
}
@@ -90,6 +91,7 @@ static int hapqa_extract(AVBSFContext *bsf, AVPacket *pkt)
if (check_texture(ctx, section_type) == 0){ /* the second texture is not the one to keep */
av_log(bsf, AV_LOG_ERROR, "No valid texture found.\n");
+ ret = AVERROR_INVALIDDATA;
goto fail;
}
}