[FFmpeg-cvslog] ffmpeg: warns the user when the selected pixel format is ignored

Stefano Sabatini git at videolan.org
Sun Mar 27 17:11:40 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat Mar 26 15:26:45 2011 +0100| [2ee85c067129e5c456dc2eb1807140dc2e434d9a] | committer: Stefano Sabatini

ffmpeg: warns the user when the selected pixel format is ignored

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2ee85c067129e5c456dc2eb1807140dc2e434d9a
---

 ffmpeg.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index a8d0dcf..50cda1a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -593,8 +593,14 @@ static void choose_pixel_fmt(AVStream *st, AVCodec *codec)
             if(*p == st->codec->pix_fmt)
                 break;
         }
-        if(*p == -1)
+        if (*p == -1) {
+            av_log(NULL, AV_LOG_WARNING,
+                   "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",
+                   av_pix_fmt_descriptors[st->codec->pix_fmt].name,
+                   codec->name,
+                   av_pix_fmt_descriptors[codec->pix_fmts[0]].name);
             st->codec->pix_fmt = codec->pix_fmts[0];
+        }
     }
 }
 




More information about the ffmpeg-cvslog mailing list