summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-05-12 12:21:08 +0200
committerAnton Khirnov <anton@khirnov.net>2016-07-25 13:57:01 +0200
commitc6ad3a731fb9cbcf468f698f7ea75ba0568d8122 (patch)
treecfd9c9a9b6a99d860ca00cba5cf7e6032d4716a9
parentd24311de89022a5daa4256367682fdd68d6401d3 (diff)
cfhd: Merge conditions for highpass/lowpass coefficient reading
-rw-r--r--libavcodec/cfhd.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index ad15cd04b5..23f9cddaa9 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -747,15 +747,14 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
if ((ret = parse_subband_tag(avctx, s, tag, data)) < 0)
break;
- if (tag == 4 && data == 0xf0f && s->a_width && s->a_height) {
- if ((ret = read_lowpass_coeffs(avctx, s, &gb, coeff_data)) < 0)
- return ret;
- }
-
- if (tag == 55 && s->subband_num_actual != 255 &&
- s->a_width && s->a_height) {
- if ((ret = read_highpass_coeffs(avctx, s, &gb, coeff_data)) < 0)
- return ret;
+ if (s->a_width && s->a_height) {
+ if (tag == 4 && data == 0xf0f) {
+ if ((ret = read_lowpass_coeffs(avctx, s, &gb, coeff_data)) < 0)
+ return ret;
+ } else if (tag == 55 && s->subband_num_actual != 255) {
+ if ((ret = read_highpass_coeffs(avctx, s, &gb, coeff_data)) < 0)
+ return ret;
+ }
}
}