summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorelupus <elupus@xbmc.org>2011-04-22 15:42:51 +0200
committerJoakim Plate <elupus@ecce.se>2011-07-16 12:38:25 +0200
commit900321b08c95bd42e6db53864bfffbe48d6019da (patch)
tree8faa04e8890d50da30cb8b05617ff4b7e473c429 /libavcodec
parent8b973d4937f833d1c7a226cfb2c2bc404e8f23a7 (diff)
downloadffmpeg-900321b08c95bd42e6db53864bfffbe48d6019da.tar.gz
Don't mark generated dummy frame output from mpeg1/2 decoder as keyframe.
We use this flag to tell when to assume decoded data is free from artifacts after a seek. The mpeg1/2 decoder will generate a dummy frame if decoding is started on a non keyframe. This will sadly be output from decoder to player and displayed as a gray screen.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index d3540c961a..3749fd9bd3 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1114,6 +1114,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
/* Allocate a dummy frame */
i= ff_find_unused_picture(s, 0);
s->last_picture_ptr= &s->picture[i];
+ s->last_picture_ptr->key_frame = 0;
if(ff_alloc_picture(s, s->last_picture_ptr, 0) < 0)
return -1;
ff_thread_report_progress((AVFrame*)s->last_picture_ptr, INT_MAX, 0);
@@ -1123,6 +1124,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
/* Allocate a dummy frame */
i= ff_find_unused_picture(s, 0);
s->next_picture_ptr= &s->picture[i];
+ s->next_picture_ptr->key_frame = 0;
if(ff_alloc_picture(s, s->next_picture_ptr, 0) < 0)
return -1;
ff_thread_report_progress((AVFrame*)s->next_picture_ptr, INT_MAX, 0);