[FFmpeg-cvslog] avformat/assenc: return correct error code

Clément Bœsch git at videolan.org
Sun Sep 21 18:50:50 CEST 2014


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat Sep 20 21:39:57 2014 +0200| [e60770679b5605e5af556d48aabd3789f63d2c96] | committer: Clément Bœsch

avformat/assenc: return correct error code

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e60770679b5605e5af556d48aabd3789f63d2c96
---

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

diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 2afeef7..24833d2 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -47,7 +47,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);



More information about the ffmpeg-cvslog mailing list