summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libffmpeg/xine_decoder.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index b30de9bbe..f7efebf9f 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.121 2003/05/28 18:16:46 jstembridge Exp $
+ * $Id: xine_decoder.c,v 1.122 2003/05/29 01:04:54 jstembridge Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -145,7 +145,13 @@ static pthread_once_t once_control = PTHREAD_ONCE_INIT;
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");
@@ -156,8 +162,8 @@ static int get_buffer(AVCodecContext *context, AVFrame *av_frame){
}
img = this->stream->video_out->get_frame (this->stream->video_out,
- this->context->width,
- this->context->height,
+ width,
+ height,
this->xine_aspect_ratio,
this->output_format,
VO_BOTH_FIELDS);
@@ -277,9 +283,6 @@ static void init_video_codec (ff_video_decoder_t *this, xine_bmiheader *bih) {
#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)
@@ -904,8 +907,8 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
tmp_img = img;
img = this->stream->video_out->get_frame (this->stream->video_out,
- this->context->width,
- this->context->height,
+ img->width,
+ img->height,
this->xine_aspect_ratio,
this->output_format,
VO_BOTH_FIELDS);
@@ -915,7 +918,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
pp_postprocess(this->av_frame->data, this->av_frame->linesize,
img->base, img->pitches,
- this->context->width, this->context->height,
+ img->width, img->height,
this->av_frame->qscale_table, this->av_frame->qstride,
this->pp_mode, this->pp_context,
this->av_frame->pict_type);