]> git.sesse.net Git - ffmpeg/commitdiff
lavf/assdec: return appropriate error code instead of -1.
authorClément Bœsch <ubitux@gmail.com>
Fri, 23 Nov 2012 21:47:51 +0000 (22:47 +0100)
committerClément Bœsch <ubitux@gmail.com>
Sat, 1 Dec 2012 23:06:03 +0000 (00:06 +0100)
libavformat/assdec.c

index 0d960f1ee8d5b8b8b32b48597d06a962d7bb0ddb..6c4614ec47db22aa0db8bae5ef6b1c6ba62115d7 100644 (file)
@@ -88,7 +88,7 @@ static int ass_read_header(AVFormatContext *s)
 
     st = avformat_new_stream(s, NULL);
     if (!st)
-        return -1;
+        return AVERROR(ENOMEM);
     avpriv_set_pts_info(st, 64, 1, 100);
     st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
     st->codec->codec_id= AV_CODEC_ID_SSA;