From: James S. <jst...@us...> - 2003-05-28 18:16:52
|
Update of /cvsroot/xine/xine-lib/src/libffmpeg In directory sc8-pr-cvs1:/tmp/cvs-serv8684 Modified Files: xine_decoder.c Log Message: make sure the frame that we postprocess into has the same dimensions as the frame used for direct rendering Index: xine_decoder.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libffmpeg/xine_decoder.c,v retrieving revision 1.120 retrieving revision 1.121 diff -u -r1.120 -r1.121 --- xine_decoder.c 26 May 2003 20:07:10 -0000 1.120 +++ xine_decoder.c 28 May 2003 18:16:46 -0000 1.121 @@ -145,13 +145,7 @@ static int get_buffer(AVCodecContext *context, AVFrame *av_frame){ ff_video_decoder_t * this = (ff_video_decoder_t *)context->opaque; vo_frame_t *img; - int align, width, height; - align=15; - - width = (context->width +align)&~align; - height = (context->height+align)&~align; - if( this->context->pix_fmt != PIX_FMT_YUV420P ) { if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) printf("ffmpeg: unsupported frame format, DR1 disabled.\n"); @@ -162,8 +156,8 @@ } img = this->stream->video_out->get_frame (this->stream->video_out, - width, - height, + this->context->width, + this->context->height, this->xine_aspect_ratio, this->output_format, VO_BOTH_FIELDS); @@ -283,6 +277,9 @@ #ifdef ENABLE_DIRECT_RENDERING if( this->context->pix_fmt == PIX_FMT_YUV420P && this->codec->capabilities & CODEC_CAP_DR1 ) { + this->context->width = (this->context->width + 15) & ~15; + this->context->height = (this->context->height + 15) & ~15; + this->context->get_buffer = get_buffer; this->context->release_buffer = release_buffer; if (this->stream->xine->verbosity >= XINE_VERBOSITY_LOG) |