Commit 1be66a3d authored by kabi's avatar kabi

* not checking for get_buffer_callback - it would be user's error

* if DR1 is disabled in get_buffer_callback silently fallback to
  non-dr rendering


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1208 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 31b1c57e
...@@ -561,11 +561,12 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, ...@@ -561,11 +561,12 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
avctx->width = width; avctx->width = width;
avctx->height = height; avctx->height = height;
if (avctx->flags & CODEC_FLAG_DR1 && avctx->get_buffer_callback) if (avctx->flags & CODEC_FLAG_DR1)
{ {
s->width = -1; s->width = -1;
avctx->dr_buffer[0] = avctx->dr_buffer[1] = avctx->dr_buffer[2] = 0; 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"); fprintf(stderr, "get_buffer() failed\n");
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment