comparison dv.c @ 864:6eda806efda9 libavcodec

* 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
author kabi
date Thu, 14 Nov 2002 18:43:49 +0000
parents 058194d7ade6
children 22ee74da2cd3
comparison
equal deleted inserted replaced
863:4ba00af12589 864:6eda806efda9
559 } 559 }
560 560
561 avctx->width = width; 561 avctx->width = width;
562 avctx->height = height; 562 avctx->height = height;
563 563
564 if (avctx->flags & CODEC_FLAG_DR1 && avctx->get_buffer_callback) 564 if (avctx->flags & CODEC_FLAG_DR1)
565 { 565 {
566 s->width = -1; 566 s->width = -1;
567 avctx->dr_buffer[0] = avctx->dr_buffer[1] = avctx->dr_buffer[2] = 0; 567 avctx->dr_buffer[0] = avctx->dr_buffer[1] = avctx->dr_buffer[2] = 0;
568 if(avctx->get_buffer_callback(avctx, width, height, I_TYPE) < 0){ 568 if(avctx->get_buffer_callback(avctx, width, height, I_TYPE) < 0
569 && avctx->flags & CODEC_FLAG_DR1) {
569 fprintf(stderr, "get_buffer() failed\n"); 570 fprintf(stderr, "get_buffer() failed\n");
570 return -1; 571 return -1;
571 } 572 }
572 } 573 }
573 574