summaryrefslogtreecommitdiff
path: root/libavcodec/cfhd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/cfhd.c')
-rw-r--r--libavcodec/cfhd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 20dacd1705..7de1d5488f 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -723,6 +723,11 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
got_buffer = 1;
}
+ if (!got_buffer) {
+ av_log(avctx, AV_LOG_ERROR, "No end of header tag found\n");
+ return AVERROR_INVALIDDATA;
+ }
+
while (bytestream2_get_bytes_left(&gb) > 4) {
if ((ret = parse_tag(avctx, s, &gb, &tag, &value, &planes)) < 0)
break;
@@ -745,11 +750,6 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
return AVERROR_INVALIDDATA;
}
- if (!got_buffer) {
- av_log(avctx, AV_LOG_ERROR, "No end of header tag found\n");
- return AVERROR_INVALIDDATA;
- }
-
planes = av_pix_fmt_count_planes(avctx->pix_fmt);
for (plane = 0; plane < planes; plane++) {
/* level 1 */