return ret;
}
- if ((ret = init_pts(s) < 0))
+ if ((ret = init_pts(s)) < 0)
return ret;
return 0;
this_pktl = av_mallocz(sizeof(AVPacketList));
this_pktl->pkt = *pkt;
+#if FF_API_DESTRUCT_PACKET
pkt->destruct = NULL; // do not free original but only the copy
+#endif
+ pkt->buf = NULL;
av_dup_packet(&this_pktl->pkt); // duplicate the packet if it uses non-alloced memory
if (s->streams[pkt->stream_index]->last_in_packet_buffer) {