From 234c38847028aacb179ddb41cf88a7e7d92b7e48 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 21 Apr 2008 19:02:07 +0100 Subject: Debug logging of ffmpeg pixel format in case of display errors. --- src/combined/ffmpeg/ff_video_decoder.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/combined/ffmpeg/ff_video_decoder.c') diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 02282990b..d4a355d65 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -121,6 +121,10 @@ struct ff_video_decoder_s { yuv_planes_t yuv; AVPaletteControl palette_control; + +#ifdef LOG + enum PixelFormat debug_fmt; +#endif }; @@ -589,6 +593,11 @@ static void ff_convert_frame(ff_video_decoder_t *this, vo_frame_t *img) { int y; uint8_t *dy, *du, *dv, *sy, *su, *sv; +#ifdef LOG + if (this->debug_fmt != this->context->pix_fmt) + printf ("frame format == %08x\n", this->debug_fmt = this->context->pix_fmt); +#endif + dy = img->base[0]; du = img->base[1]; dv = img->base[2]; @@ -1581,6 +1590,10 @@ static video_decoder_t *ff_video_open_plugin (video_decoder_class_t *class_gen, this->dr1_frames = xine_list_new(); +#ifdef LOG + this->debug_fmt = -1; +#endif + return &this->video_decoder; } -- cgit v1.2.3 From 2be5a79b30766a67f8c59e06a3caf9c3d3acd352 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 21 Apr 2008 19:04:30 +0100 Subject: Fix display of some MJPEG streams (YUVJ420P). --- src/combined/ffmpeg/ff_video_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/combined/ffmpeg/ff_video_decoder.c') diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index d4a355d65..b18040d38 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -156,7 +156,7 @@ static int get_buffer(AVCodecContext *context, AVFrame *av_frame){ avcodec_align_dimensions(context, &width, &height); - if( this->context->pix_fmt != PIX_FMT_YUV420P ) { + if( this->context->pix_fmt != PIX_FMT_YUV420P && this->context->pix_fmt != PIX_FMT_YUVJ420P ) { if (!this->is_direct_rendering_disabled) { xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("ffmpeg_video_dec: unsupported frame format, DR1 disabled.\n")); -- cgit v1.2.3