/* now pick one of the plates */
for (i = 0; i < 2; i++) {
if (nsv->ahead[i].data) {
- /* avoid the cost of new_packet + memcpy(->data) */
- memcpy(pkt, &nsv->ahead[i], sizeof(AVPacket));
- nsv->ahead[i].data = NULL; /* we ate that one */
- return pkt->size;
+ av_packet_move_ref(pkt, &nsv->ahead[i]);
+ return 0;
}
}
if(index < 0)
return -1;
- if (avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET) < 0)
+ if (avio_seek(s->pb, st->internal->index_entries[index].pos, SEEK_SET) < 0)
return -1;
- nst->frame_offset = st->index_entries[index].timestamp;
+ nst->frame_offset = st->internal->index_entries[index].timestamp;
nsv->state = NSV_UNSYNC;
return 0;
}
return score;
}
-AVInputFormat ff_nsv_demuxer = {
+const AVInputFormat ff_nsv_demuxer = {
.name = "nsv",
.long_name = NULL_IF_CONFIG_SMALL("Nullsoft Streaming Video"),
.priv_data_size = sizeof(NSVContext),