avformat/soxenc: return more meaningful error code
authorPaul B Mahol <onemda@gmail.com>
Thu, 28 Aug 2014 15:48:13 +0000 (15:48 +0000)
committerPaul B Mahol <onemda@gmail.com>
Thu, 28 Aug 2014 15:52:25 +0000 (15:52 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/soxenc.c

index 01ebe9c..95af10c 100644 (file)
@@ -72,7 +72,7 @@ static int sox_write_header(AVFormatContext *s)
         avio_wb32(pb, comment_size);
     } else {
         av_log(s, AV_LOG_ERROR, "invalid codec; use pcm_s32le or pcm_s32be\n");
-        return -1;
+        return AVERROR(EINVAL);
     }
 
     if (comment_len)