aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-05-14 18:27:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-01 23:25:21 +0200
commitfea9ed39e670736c492deac42785a451e0d6282e (patch)
tree9d3ef578f6e4373eef21da0dc9e134b6fedc8cca
parent62e4fe09ed0bece519e845df11e380ead0d6a295 (diff)
downloadffmpeg-fea9ed39e670736c492deac42785a451e0d6282e.tar.gz
hevc: make avcodec_decode_video2() fail if get_format() fails
Personally, I need the decoder to back out if get_format() returns no usable pixel format. This didn't work because the error code was not propagated down the call chain. This in turn happened because the variable declaration removed in this patch shadowed the variable, whose value is returned at the end of the function. Consequently, failures of decode_nal_unit() were ignored in this place. Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit cc5e4bb48476a89cc8ce0c41bc2bd2e8fda9b37c) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/hevc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index cf61a06ba3..8c5581f2af 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2961,7 +2961,6 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
/* parse the NAL units */
for (i = 0; i < s->nb_nals; i++) {
- int ret;
s->skipped_bytes = s->skipped_bytes_nal[i];
s->skipped_bytes_pos = s->skipped_bytes_pos_nal[i];