Browse code

ffmpeg: warn if samples need to be converted in a lossy way for lossless encoders. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2011/06/19 04:54:11
Showing 1 changed files
... ...
@@ -617,6 +617,8 @@ static void choose_sample_fmt(AVStream *st, AVCodec *codec)
617 617
                 break;
618 618
         }
619 619
         if (*p == -1) {
620
+            if((codec->capabilities & CODEC_CAP_LOSSLESS) && av_get_sample_fmt_name(st->codec->sample_fmt) > av_get_sample_fmt_name(codec->sample_fmts[0]))
621
+                av_log(NULL, AV_LOG_ERROR, "Convertion will not be lossless'\n");
620 622
             av_log(NULL, AV_LOG_WARNING,
621 623
                    "Incompatible sample format '%s' for codec '%s', auto-selecting format '%s'\n",
622 624
                    av_get_sample_fmt_name(st->codec->sample_fmt),