mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
Merge remote-tracking branch 'cus/stable'
* cus/stable: ffplay: reset AVFrame to defaults before decoding each new frame. ffplay: check return code of avcodec_decode_video2() Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
690ea9359d
4
ffplay.c
4
ffplay.c
@ -1504,7 +1504,8 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
|
|||||||
return 0;
|
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) {
|
if (got_picture) {
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
@ -1667,6 +1668,7 @@ static int video_thread(void *arg)
|
|||||||
while (is->paused && !is->videoq.abort_request)
|
while (is->paused && !is->videoq.abort_request)
|
||||||
SDL_Delay(10);
|
SDL_Delay(10);
|
||||||
|
|
||||||
|
avcodec_get_frame_defaults(frame);
|
||||||
ret = get_video_frame(is, frame, &pts_int, &pkt);
|
ret = get_video_frame(is, frame, &pts_int, &pkt);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto the_end;
|
goto the_end;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user