#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])
tmp_head_idx;
int64_t tmp_match;
- ff_put_v(bc, 3); /* version */
+ ff_put_v(bc, NUT_VERSION);
ff_put_v(bc, nut->avf->nb_streams);
ff_put_v(bc, nut->max_distance);
ff_put_v(bc, nut->time_base_count);
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);