Skip to content

Commit

Permalink
avformat/segafilmenc: Postpone check for existence of video stream
Browse files Browse the repository at this point in the history
Up until now, the Sega FILM muxer complained if the first stream wasn't a
video stream that there is no video stream at all which is of course
nonsense. So postpone this check.

Signed-off-by: Andreas Rheinhardt <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
mkver authored and michaelni committed Jan 14, 2020
1 parent 8ae026d commit 30859c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libavformat/segafilmenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ static int film_init(AVFormatContext *format_context)
}
film->video_index = i;
}
}

if (film->video_index == -1) {
av_log(format_context, AV_LOG_ERROR, "No video stream present.\n");
return AVERROR(EINVAL);
}
if (film->video_index == -1) {
av_log(format_context, AV_LOG_ERROR, "No video stream present.\n");
return AVERROR(EINVAL);
}

if (audio != NULL && get_audio_codec_id(audio->codecpar->codec_id) < 0) {
Expand Down

0 comments on commit 30859c2

Please sign in to comment.