]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/assenc.c
avformat/mux: factorize interleaved write_packet
[ffmpeg] / libavcodec / assenc.c
index dc4f0ffa9722032594ea52533d79ee48584c7448..a6e1d5d8b908be3f5b09ebdbe0c227b4ba969f4e 100644 (file)
@@ -57,7 +57,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
 
         if (sub->rects[i]->type != SUBTITLE_ASS) {
             av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n");
-            return -1;
+            return AVERROR(EINVAL);
         }
 
 #if FF_API_ASS_TIMING
@@ -93,7 +93,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
 
         if (len > bufsize-total_len-1) {
             av_log(avctx, AV_LOG_ERROR, "Buffer too small for ASS event.\n");
-            return -1;
+            return AVERROR_BUFFER_TOO_SMALL;
         }
 
         total_len += len;