[FFmpeg-devel] [PATCH] lavf/matroskaenc: return an error for unsupported types.

Nicolas George nicolas.george at normalesup.org
Wed May 1 15:05:00 CEST 2013

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
 libavformat/matroskaenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Printing the error and then ignoring it seems rather strahge in that
context, but maybe I am missing something.

FATE still succeeds, of course.

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 6726fd9..c34be41 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -698,7 +698,7 @@ static int mkv_write_tracks(AVFormatContext *s)
                 av_log(s, AV_LOG_ERROR, "Only audio, video, and subtitles are supported for Matroska.\n");
-                break;
+                return AVERROR(EINVAL);
         ret = mkv_write_codecprivate(s, pb, codec, native_id, qt_id);
         if (ret < 0) return ret;

More information about the ffmpeg-devel mailing list