Browse Source

movenc: Return a proper error code for invalid combinations

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n2.1
Martin Storsjö 12 years ago
parent
commit
f2b00a5372
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/movenc.c

+ 2
- 2
libavformat/movenc.c View File

@@ -3179,7 +3179,7 @@ static int mov_write_header(AVFormatContext *s)
if (!s->pb->seekable && if (!s->pb->seekable &&
(!(mov->flags & FF_MOV_FLAG_FRAGMENT) || mov->ism_lookahead)) { (!(mov->flags & FF_MOV_FLAG_FRAGMENT) || mov->ism_lookahead)) {
av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n"); av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n");
return -1;
return AVERROR(EINVAL);
} }




@@ -3187,7 +3187,7 @@ static int mov_write_header(AVFormatContext *s)
if (mov->mode == MODE_PSP) { if (mov->mode == MODE_PSP) {
if (s->nb_streams != 2) { if (s->nb_streams != 2) {
av_log(s, AV_LOG_ERROR, "PSP mode need one video and one audio stream\n"); av_log(s, AV_LOG_ERROR, "PSP mode need one video and one audio stream\n");
return -1;
return AVERROR(EINVAL);
} }
mov_write_uuidprof_tag(pb, s); mov_write_uuidprof_tag(pb, s);
} }


Loading…
Cancel
Save