summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-08-23 12:12:34 +0200
committerAnton Khirnov <anton@khirnov.net>2022-09-05 08:10:55 +0200
commit090f12b15750bc3eb81b2d892cd980e9285cfe48 (patch)
treea6a2dc49eb97e73c5642bb5961bb0952a7994793 /libavformat/mov.c
parentf7b3fc4afe6540506257c73a93a3f4272c250d44 (diff)
lavf/dv: make returning the video packet optional
The mov demuxer only returns DV audio, video packets are discarded. It first reads the data to be parsed into a packet. Then both this packet and the pointer to its data are passed together to avpriv_dv_produce_packet(), which parses the data and partially overwrites the packet. This is confusing and potentially dangerous, so just pass NULL and avoid pointless packet modification.
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index df45408060..b93facf7e0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -8777,7 +8777,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
}
#if CONFIG_DV_DEMUXER
if (mov->dv_demux && sc->dv_audio_container) {
- ret = avpriv_dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size, pkt->pos);
+ ret = avpriv_dv_produce_packet(mov->dv_demux, NULL, pkt->data, pkt->size, pkt->pos);
av_packet_unref(pkt);
if (ret < 0)
return ret;