File ffmpeg-new-coder-errors.diff of Package A_tw-ffmpeg

61
 
1
From: Jan Engelhardt <jengelh@inai.de>
2
Date: 2016-04-10 23:23:53.138440254 +0200
3
4
Improve the error messages a bit to say what's really going on
5
(in light of openSUSE's reduced build).
6
7
---
8
 fftools/ffmpeg.c        |    2 +-
9
 fftools/ffmpeg_filter.c |    4 ++--
10
 fftools/ffmpeg_opt.c    |    2 +-
11
 3 files changed, 4 insertions(+), 4 deletions(-)
12
13
Index: ffmpeg-4.2/fftools/ffmpeg.c
14
===================================================================
15
--- ffmpeg-4.2.orig/fftools/ffmpeg.c
16
+++ ffmpeg-4.2/fftools/ffmpeg.c
17
@@ -2898,7 +2898,7 @@ static int init_input_stream(int ist_ind
18
     if (ist->decoding_needed) {
19
         AVCodec *codec = ist->dec;
20
         if (!codec) {
21
-            snprintf(error, error_len, "Decoder (codec %s) not found for input stream #%d:%d",
22
+            snprintf(error, error_len, "This build of ffmpeg does not include a \"%s\" decoder needed for input stream #%d:%d.",
23
                     avcodec_get_name(ist->dec_ctx->codec_id), ist->file_index, ist->st->index);
24
             return AVERROR(EINVAL);
25
         }
26
Index: ffmpeg-4.2/fftools/ffmpeg_filter.c
27
===================================================================
28
--- ffmpeg-4.2.orig/fftools/ffmpeg_filter.c
29
+++ ffmpeg-4.2/fftools/ffmpeg_filter.c
30
@@ -981,7 +981,7 @@ static int configure_input_filter(Filter
31
 {
32
     if (!ifilter->ist->dec) {
33
         av_log(NULL, AV_LOG_ERROR,
34
-               "No decoder for stream #%d:%d, filtering impossible\n",
35
+               "This build of ffmpeg does not have a suitable decoder for stream #%d:%d enabled, filtering impossible\n",
36
                ifilter->ist->file_index, ifilter->ist->st->index);
37
         return AVERROR_DECODER_NOT_FOUND;
38
     }
39
@@ -1131,7 +1131,7 @@ int configure_filtergraph(FilterGraph *f
40
         if (!ost->enc) {
41
             /* identical to the same check in ffmpeg.c, needed because
42
                complex filter graphs are initialized earlier */
43
-            av_log(NULL, AV_LOG_ERROR, "Encoder (codec %s) not found for output stream #%d:%d\n",
44
+            av_log(NULL, AV_LOG_ERROR, "This build of ffmpeg does not include a \"%s\" encoder needed for output stream #%d:%d.\n",
45
                      avcodec_get_name(ost->st->codecpar->codec_id), ost->file_index, ost->index);
46
             ret = AVERROR(EINVAL);
47
             goto fail;
48
Index: ffmpeg-4.2/fftools/ffmpeg_opt.c
49
===================================================================
50
--- ffmpeg-4.2.orig/fftools/ffmpeg_opt.c
51
+++ ffmpeg-4.2/fftools/ffmpeg_opt.c
52
@@ -1327,7 +1327,7 @@ static int choose_encoder(OptionsContext
53
             if (!ost->enc) {
54
                 av_log(NULL, AV_LOG_FATAL, "Automatic encoder selection failed for "
55
                        "output stream #%d:%d. Default encoder for format %s (codec %s) is "
56
-                       "probably disabled. Please choose an encoder manually.\n",
57
+                       "probably disabled or this build of ffmpeg does not include that codec. Please choose an encoder manually.\n",
58
                        ost->file_index, ost->index, s->oformat->name,
59
                        avcodec_get_name(ost->st->codecpar->codec_id));
60
                 return AVERROR_ENCODER_NOT_FOUND;
61