[FFmpeg-devel] [PATCH 17/17] avformat/assenc: return correct error code

Clément Bœsch u at pkh.me
Sat Sep 20 22:27:57 CEST 2014


---
 libavformat/assenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 5779e92..8593b6c 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -45,7 +45,7 @@ static int write_header(AVFormatContext *s)
     if (s->nb_streams != 1 || (avctx->codec_id != AV_CODEC_ID_SSA &&
                                avctx->codec_id != AV_CODEC_ID_ASS)) {
         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;
     avpriv_set_pts_info(s->streams[0], 64, 1, 100);
-- 
2.1.0



More information about the ffmpeg-devel mailing list