]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nutenc.c
yop: initialize palette to 0
[ffmpeg] / libavformat / nutenc.c
index 581a202f119274832689f53e1b9d3cb7f11270a7..df70f941221878a9b70c603f4cca4068d49ccc06 100644 (file)
@@ -27,6 +27,7 @@
 #include "nut.h"
 #include "internal.h"
 #include "avio_internal.h"
+#include "riff.h"
 
 static int find_expected_header(AVCodecContext *c, int size, int key_frame,
                                 uint8_t out[64])
@@ -767,8 +768,12 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt)
     int store_sp  = 0;
     int ret;
 
-    if (pkt->pts < 0)
-        return -1;
+    if (pkt->pts < 0) {
+        av_log(s, AV_LOG_ERROR,
+               "Negative pts not supported stream %d, pts %"PRId64"\n",
+               pkt->stream_index, pkt->pts);
+        return AVERROR_INVALIDDATA;
+    }
 
     if (1LL << (20 + 3 * nut->header_count) <= avio_tell(bc))
         write_headers(s, bc);