summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-08 14:41:23 +0200
committerMarton Balint <cus@passwd.hu>2012-06-08 21:32:10 +0200
commit349b65eee2fd5590b7e511c915dcd2d3aef3960e (patch)
treec8cf939724f57a1ddc2e1242bc5b3840f886dc62 /ffplay.c
parent718607be28fd1c3cb1d2d7ad7dd589211b93ab3f (diff)
ffplay: check return code of avcodec_decode_video2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index cb62614f36..01a010e0c1 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1504,7 +1504,8 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
return 0;
}
- avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt);
+ if(avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt) < 0)
+ return -1;
if (got_picture) {
int ret = 1;