diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-12-12 10:23:41 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-12-16 06:22:19 +0200 |
commit | 8a0f0740432772d75dccd47add3844634392f0d5 (patch) | |
tree | ef454d334e5b39cb42c216ee94b9d35865487fa8 | |
parent | 3bf9f6c1a7690a9e69c4156c377909be2fa42979 (diff) | |
download | mpv-8a0f0740432772d75dccd47add3844634392f0d5.tar.bz2 mpv-8a0f0740432772d75dccd47add3844634392f0d5.tar.xz |
vd_ffmpeg: fix MP_IMGTYPE selection for non-ref non-B frames
Change direct rendering buffer allocation code to treat non-ref frames
like B-frames even if has_b_frames is not set and they are indeed not
B-frames (no reordering). Treating it as an I/P frame would violate
the assumptions of MPlayer's buffering system, which thinks only the
latest previous I/P frame is needed (in addition to one possibly being
decoded). In this case the previous I/P frame will still be needed in
the future, not the non-ref frame being decoded now.
This happens with flv files, as in bug #1079, and this change fixes that
corruption.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32700 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index a874b8411c..d493143a34 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -552,7 +552,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ return avctx->get_buffer(avctx, pic); } - if(avctx->has_b_frames){ + if(avctx->has_b_frames || ctx->b_count){ type= MP_IMGTYPE_IPB; }else{ type= MP_IMGTYPE_IP; |