OSDN Git Service

matroskaenc: replace AVERROR_NOTSUPP with AVERROR(EINVAL)
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Thu, 21 Apr 2011 09:24:34 +0000 (11:24 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Fri, 22 Apr 2011 08:21:21 +0000 (10:21 +0200)
AVERROR_NOTSUPP has been dropped with the major bump. Since the
signalled error denotes a configuration problem, AVERROR(EINVAL) looks
an adequate replacement.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
libavformat/matroskaenc.c

index 5ce2a54..5e4552a 100644 (file)
@@ -618,7 +618,7 @@ static int mkv_write_tracks(AVFormatContext *s)
                 put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_SUBTITLE);
                 if (!native_id) {
                     av_log(s, AV_LOG_ERROR, "Subtitle codec %d is not supported.\n", codec->codec_id);
-                    return AVERROR_NOTSUPP;
+                    return AVERROR(EINVAL);
                 }
                 break;
             default: