Am 02.07.2010 15:59, schrieb Fabian Greffrath:
However, I agree that the error message
Encoder (codec id 86017) not found for output stream #0.0
should be improved to at least call the encoder by name.

Which will be done by the attached patch. Would you please try it out?

  - Fabian

diff --git a/ffmpeg.c b/ffmpeg.c
index 6b9380f..e83e1a5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2133,8 +2133,8 @@ static int av_transcode(AVFormatContext **output_files,
             if (!codec)
                 codec = avcodec_find_encoder(ost->st->codec->codec_id);
             if (!codec) {
-                snprintf(error, sizeof(error), "Encoder (codec id %d) not found for output stream #%d.%d",
-                         ost->st->codec->codec_id, ost->file_index, ost->index);
+                snprintf(error, sizeof(error), "Encoder (codec name %s) not found for output stream #%d.%d",
+                         ost->st->codec->codec_name, ost->file_index, ost->index);
                 ret = AVERROR(EINVAL);
                 goto dump_format;
             }
@@ -2156,8 +2156,8 @@ static int av_transcode(AVFormatContext **output_files,
             if (!codec)
                 codec = avcodec_find_decoder(ist->st->codec->codec_id);
             if (!codec) {
-                snprintf(error, sizeof(error), "Decoder (codec id %d) not found for input stream #%d.%d",
-                        ist->st->codec->codec_id, ist->file_index, ist->index);
+                snprintf(error, sizeof(error), "Decoder (codec name %s) not found for input stream #%d.%d",
+                        ist->st->codec->codec_name, ist->file_index, ist->index);
                 ret = AVERROR(EINVAL);
                 goto dump_format;
             }

Reply via email to