Browse Source

lavf/{srt,microdvd}: correctly raise error on avformat_new_stream() error.

tags/n1.0
Clément Bœsch 13 years ago
parent
commit
608bda925a
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      libavformat/microdvddec.c
  2. +1
    -1
      libavformat/srtdec.c

+ 1
- 1
libavformat/microdvddec.c View File

@@ -62,7 +62,7 @@ static int microdvd_read_header(AVFormatContext *s)
char c;

if (!st)
return -1;
return AVERROR(ENOMEM);
for (i=0; i<FF_ARRAY_ELEMS(microdvd->lines); i++) {
microdvd->pos[i] = avio_tell(s->pb);
ff_get_line(s->pb, microdvd->lines[i], sizeof(microdvd->lines[i]));


+ 1
- 1
libavformat/srtdec.c View File

@@ -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;


Loading…
Cancel
Save