]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libx265.c
avformat/oggparsevorbis: check packet size before reading new_len from it
[ffmpeg] / libavcodec / libx265.c
index cc4e61e23b5488d20a8e9a8c54a47170a491d027..2370601ed78fd713104447ddbed8bb5f71acdedf 100644 (file)
 #include "avcodec.h"
 #include "internal.h"
 
+#if defined(_MSC_VER)
+#define X265_API_IMPORTS 1
+#endif
+
 typedef struct libx265Context {
     const AVClass *class;
 
@@ -231,7 +235,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     ret = x265_encoder_encode(ctx->encoder, &nal, &nnal,
                               pic ? &x265pic : NULL, &x265pic_out);
     if (ret < 0)
-        return AVERROR_UNKNOWN;
+        return AVERROR_EXTERNAL;
 
     if (!nnal)
         return 0;