size = avpriv_mpegts_parse_packet(dv->mpeg_demux, pkt, packet->buf,
packet->len);
dv->queue_first = packet->next;
- av_free(packet->buf);
- av_free(packet);
+ av_freep(&packet->buf);
+ av_freep(&packet);
dv->packets--;
if (size > 0)
if (!dv->max_packets)
dv->max_packets = 100;
- if (dv->type == IEC61883_HDV) {
+ if (CONFIG_MPEGTS_DEMUXER && dv->type == IEC61883_HDV) {
/* Init HDV receive */
pthread_mutex_destroy(&dv->mutex);
#endif
- if (dv->type == IEC61883_HDV) {
+ if (CONFIG_MPEGTS_DEMUXER && dv->type == IEC61883_HDV) {
iec61883_mpeg2_recv_stop(dv->iec61883_mpeg2);
iec61883_mpeg2_close(dv->iec61883_mpeg2);
avpriv_mpegts_parse_close(dv->mpeg_demux);
while (dv->queue_first) {
DVPacket *packet = dv->queue_first;
dv->queue_first = packet->next;
- av_free(packet->buf);
- av_free(packet);
+ av_freep(&packet->buf);
+ av_freep(&packet);
}
iec61883_cmp_disconnect(dv->raw1394, dv->node, dv->output_port,