diff --git a/libavformat/microdvddec.c b/libavformat/microdvddec.c index 5e37bc38a3..b1229fae01 100644 --- a/libavformat/microdvddec.c +++ b/libavformat/microdvddec.c @@ -62,7 +62,7 @@ static int microdvd_read_header(AVFormatContext *s) char c; if (!st) - return -1; + return AVERROR(ENOMEM); for (i=0; ilines); i++) { microdvd->pos[i] = avio_tell(s->pb); ff_get_line(s->pb, microdvd->lines[i], sizeof(microdvd->lines[i])); 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;