Browse code

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

Stefano Sabatini authored on 2011/03/26 23:26:45
Showing 1 changed files
... ...
@@ -593,8 +593,14 @@ static void choose_pixel_fmt(AVStream *st, AVCodec *codec)
593 593
             if(*p == st->codec->pix_fmt)
594 594
                 break;
595 595
         }
596
-        if(*p == -1)
596
+        if (*p == -1) {
597
+            av_log(NULL, AV_LOG_WARNING,
598
+                   "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",
599
+                   av_pix_fmt_descriptors[st->codec->pix_fmt].name,
600
+                   codec->name,
601
+                   av_pix_fmt_descriptors[codec->pix_fmts[0]].name);
597 602
             st->codec->pix_fmt = codec->pix_fmts[0];
603
+        }
598 604
     }
599 605
 }
600 606