diff options
author | James Stembridge <jstembridge@users.sourceforge.net> | 2003-04-16 21:02:22 +0000 |
---|---|---|
committer | James Stembridge <jstembridge@users.sourceforge.net> | 2003-04-16 21:02:22 +0000 |
commit | 616171f31e7ae8125122ce8eee84db8e6c49e4b4 (patch) | |
tree | bc9357a7565f51f52f441faaedc58c432f4e7930 | |
parent | 78df4cb867119c615b76997726703993acb80bd1 (diff) | |
download | xine-lib-616171f31e7ae8125122ce8eee84db8e6c49e4b4.tar.gz xine-lib-616171f31e7ae8125122ce8eee84db8e6c49e4b4.tar.bz2 |
disable direct rendering when the frame size output by ffmpeg is different from the one found in the header
CVS patchset: 4624
CVS date: 2003/04/16 21:02:22
-rw-r--r-- | src/libffmpeg/xine_decoder.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index a9446e951..6411674a7 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.109 2003/04/16 18:25:58 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.110 2003/04/16 21:02:22 jstembridge Exp $ * * xine decoder plugin using ffmpeg * @@ -144,9 +144,20 @@ 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 disable = 0; if( this->context->pix_fmt != PIX_FMT_YUV420P ) { printf("ffmpeg: unsupported frame format, DR1 disabled.\n"); + disable = 1; + } + + if( this->bih.biWidth != context->width || + this->bih.biHeight != context->height ) { + printf("ffmpeg: decoded and output frame size are not equal, DR1 disabled.\n"); + disable = 1; + } + + if (disable) { this->context->get_buffer = avcodec_default_get_buffer; this->context->release_buffer = avcodec_default_release_buffer; return avcodec_default_get_buffer(context, av_frame); |