1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-27 10:03:32 +00:00

demux/packet: fix demux_packet_shorten

for the rawaudio demuxer to do the expected gapless playback
This commit is contained in:
Tom Yan 2018-09-30 03:38:57 +08:00 committed by Jan Ekström
parent 085943df25
commit 95636c65e7

View File

@ -110,8 +110,8 @@ struct demux_packet *new_demux_packet(size_t len)
void demux_packet_shorten(struct demux_packet *dp, size_t len)
{
assert(len <= dp->len);
dp->len = len;
memset(dp->buffer + dp->len, 0, AV_INPUT_BUFFER_PADDING_SIZE);
av_shrink_packet(dp->avpacket, len);
dp->len = dp->avpacket->size;
}
void free_demux_packet(struct demux_packet *dp)