summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/dv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/libavcodec/dv.c')
-rw-r--r--src/libffmpeg/libavcodec/dv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libffmpeg/libavcodec/dv.c b/src/libffmpeg/libavcodec/dv.c
index dc27dc84c..1492d6854 100644
--- a/src/libffmpeg/libavcodec/dv.c
+++ b/src/libffmpeg/libavcodec/dv.c
@@ -495,7 +495,8 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
UINT8 *buf, int buf_size)
{
DVVideoDecodeContext *s = avctx->priv_data;
- int sct, dsf, apt, ds, nb_dif_segs, vs, size, width, height, i, packet_size;
+ int sct, dsf, apt, ds, nb_dif_segs, vs, width, height, i, packet_size;
+ unsigned size;
UINT8 *buf_ptr;
const UINT16 *mb_pos_ptr;
AVPicture *picture;
@@ -560,11 +561,12 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
avctx->width = width;
avctx->height = height;
- if (avctx->flags & CODEC_FLAG_DR1 && avctx->get_buffer_callback)
+ if (avctx->flags & CODEC_FLAG_DR1)
{
s->width = -1;
avctx->dr_buffer[0] = avctx->dr_buffer[1] = avctx->dr_buffer[2] = 0;
- if(avctx->get_buffer_callback(avctx, width, height, I_TYPE) < 0){
+ if(avctx->get_buffer_callback(avctx, width, height, I_TYPE) < 0
+ && avctx->flags & CODEC_FLAG_DR1) {
fprintf(stderr, "get_buffer() failed\n");
return -1;
}