When the call to get_bits_left() fails, the return value is not an negative error code. This patch explicitly assignes an error code to the return variable ret.
Signed-off-by: Pan Bian <bianpan2...@163.com> --- libavcodec/hevc_ps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index a4f7ed6..f87a577 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1691,6 +1691,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, if (get_bits_left(gb) < 0) { av_log(avctx, AV_LOG_ERROR, "Overread PPS by %d bits\n", -get_bits_left(gb)); + ret = AVERROR_INVALIDDATA; goto err; } -- 1.9.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel