ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Mon Jul 13 
07:49:03 2015 +0200| [b9f76d19d81fbc7f088536f966c2d3dc23c34ddc] | committer: 
Anton Khirnov

hevc_ps: make sure failing to decode an SPS always returns an error

Some of the goto err clauses do not set the error code. It seems better
to fall back on INVALIDDATA instead of adding it everywhere explicitly.

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

 libavcodec/hevc_ps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 6102905..a1eaf6e 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -965,7 +965,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, 
unsigned int *sps_id,
     return 0;
 
 err:
-    return ret;
+    return ret < 0 ? ret : AVERROR_INVALIDDATA;
 }
 
 int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx,

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to