diff options
author | Tom Yan <tom.ty89@outlook.com> | 2018-09-30 03:38:57 +0800 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-09-30 12:32:03 +0300 |
commit | 95636c65e73c1d0d8cba43d8c230291d99962e88 (patch) | |
tree | 83f572a56153e1c77e4fd6c9121a3fa84d57b83c | |
parent | 085943df25fc66cd461f21ff1374fc3f86e5ce11 (diff) |
demux/packet: fix demux_packet_shorten
for the rawaudio demuxer to do the expected gapless playback
-rw-r--r-- | demux/packet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/packet.c b/demux/packet.c index 155e4d7f15..98ca24d93d 100644 --- a/demux/packet.c +++ b/demux/packet.c @@ -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) |