diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 6102905709..a1eaf6ea11 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,