summaryrefslogtreecommitdiff
path: root/libavformat/srtdec.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-06-15 18:40:14 +0200
committerClément Bœsch <ubitux@gmail.com>2012-06-15 18:40:14 +0200
commit608bda925a933be6ffdb91937125b6bba0c8a3d7 (patch)
treea7849b5a51a90c1beedea3a100959e41a790fcf7 /libavformat/srtdec.c
parent9b6f2c7483952d889dfafc5d0ffbc34c0805c841 (diff)
downloadffmpeg-608bda925a933be6ffdb91937125b6bba0c8a3d7.tar.gz
lavf/{srt,microdvd}: correctly raise error on avformat_new_stream() error.
Diffstat (limited to 'libavformat/srtdec.c')
-rw-r--r--libavformat/srtdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 481f4a6bb0..9cd393ef7f 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -44,7 +44,7 @@ static int srt_read_header(AVFormatContext *s)
{
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
- return -1;
+ return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 64, 1, 1000);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id = CODEC_ID_SRT;