[FFmpeg-cvslog] hevc: make avcodec_decode_video2() fail if get_format() fails

wm4 git at videolan.org
Thu May 21 21:26:06 CEST 2015


ffmpeg | branch: release/2.5 | wm4 <nfxjfg at googlemail.com> | Thu May 14 18:27:31 2015 +0200| [02c1074f18f6d696122e1fc098bff8e9b6adcae8] | committer: Michael Niedermayer

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 at googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit cc5e4bb48476a89cc8ce0c41bc2bd2e8fda9b37c)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02c1074f18f6d696122e1fc098bff8e9b6adcae8
---

 libavcodec/hevc.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 2ba70ac..9b563cd 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2943,7 +2943,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];
 



More information about the ffmpeg-cvslog mailing list