From: Darren S. <li...@yo...> - 2008-04-21 18:04:41
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1208800927 -3600 # Node ID e6de7bed504ce2636e291e4dc549831256d86611 # Parent 935f30e1efa424bc549951655155942393720c51 Debug logging of ffmpeg pixel format in case of display errors. diff -r e6de7bed504ce2636e291e4dc549831256d86611 -r 935f30e1efa424bc549951655155942393720c51 src/combined/ffmpeg/ff_video_decoder.c --- a/src/combined/ffmpeg/ff_video_decoder.c Mon Apr 21 19:02:07 2008 +0100 +++ b/src/combined/ffmpeg/ff_video_decoder.c Mon Apr 21 16:35:33 2008 +0100 @@ -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_de 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_pl this->dr1_frames = xine_list_new(); +#ifdef LOG + this->debug_fmt = -1; +#endif + return &this->video_decoder; } |