Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-06-14 15:02:57 +0400
committerStefano Sabatini <stefasab@gmail.com>2012-06-16 02:29:59 +0400
commit3cc1a8988112896e302c96f9df8839d983677891 (patch)
tree1d713f948b0ab4462738412955212394c184169a /libavcodec/utils.c
parent90d8506fbf1b5d9bd6ed1f01a8610df01771e3c3 (diff)
lavc/utils: in avcodec_decode_video2() return proper error code instead of -1
Return AVERROR(EINVAL) in case of invalid coded size.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8ed78d6e70..315dc57da4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1461,7 +1461,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
*got_picture_ptr= 0;
if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
- return -1;
+ return AVERROR(EINVAL);
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){
int did_split = av_packet_split_side_data(&tmp);