ffplay: reset AVFrame to defaults before decoding each new frame.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 8 Jun 2012 12:41:24 +0000 (14:41 +0200)
committerMarton Balint <cus@passwd.hu>
Fri, 8 Jun 2012 19:32:10 +0000 (21:32 +0200)
This fixes: ffplay -f lavfi -i cellauto
This was a regression since factorizing the filter code with ffmpeg.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay.c

index 01a010e..c8d768f 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -1668,6 +1668,7 @@ static int video_thread(void *arg)
         while (is->paused && !is->videoq.abort_request)
             SDL_Delay(10);
 
         while (is->paused && !is->videoq.abort_request)
             SDL_Delay(10);
 
+        avcodec_get_frame_defaults(frame);
         ret = get_video_frame(is, frame, &pts_int, &pkt);
         if (ret < 0)
             goto the_end;
         ret = get_video_frame(is, frame, &pts_int, &pkt);
         if (ret < 0)
             goto the_end;