summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2011-04-22 08:05:56 +0000
committerUoti Urpala <uau@mplayer2.org>2011-05-02 00:36:20 +0300
commitb977f5960937621f0276ec2d14b6288e95e35c3c (patch)
treee9e99ee843f17a2df70ea5ed6d14ab5e74daa85c /libmpcodecs
parentd09882bd74b4a406b4a1e66cf1761d4de67b066b (diff)
downloadmpv-b977f5960937621f0276ec2d14b6288e95e35c3c.tar.bz2
mpv-b977f5960937621f0276ec2d14b6288e95e35c3c.tar.xz
vd_ffmpeg: Make DR work with reget_buffer without buffer_hints
Allow DR to work with reget_buffer when no buffer_hints are set. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33287 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index c7f0e429f1..a4683e4080 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -525,6 +525,9 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
int type= MP_IMGTYPE_IPB;
int width= avctx->width;
int height= avctx->height;
+ // special case to handle reget_buffer without buffer hints
+ if (pic->opaque && pic->data[0] && !pic->buffer_hints)
+ return 0;
avcodec_align_dimensions(avctx, &width, &height);
//printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count);