Commit e6077067 authored by Clément Bœsch's avatar Clément Bœsch

avformat/assenc: return correct error code

parent ce8dc93a
...@@ -47,7 +47,7 @@ static int write_header(AVFormatContext *s) ...@@ -47,7 +47,7 @@ static int write_header(AVFormatContext *s)
if (s->nb_streams != 1 || (avctx->codec_id != AV_CODEC_ID_SSA && if (s->nb_streams != 1 || (avctx->codec_id != AV_CODEC_ID_SSA &&
avctx->codec_id != AV_CODEC_ID_ASS)) { avctx->codec_id != AV_CODEC_ID_ASS)) {
av_log(s, AV_LOG_ERROR, "Exactly one ASS/SSA stream is needed.\n"); av_log(s, AV_LOG_ERROR, "Exactly one ASS/SSA stream is needed.\n");
return -1; return AVERROR(EINVAL);
} }
ass->write_ts = avctx->codec_id == AV_CODEC_ID_ASS; ass->write_ts = avctx->codec_id == AV_CODEC_ID_ASS;
avpriv_set_pts_info(s->streams[0], 64, 1, 100); avpriv_set_pts_info(s->streams[0], 64, 1, 100);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment