mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-09 19:09:41 +00:00
asfdemux: Do not subtract padding twice
Only subtract implicit padding if an explicit one isn't provided. Avoids subtracting it twice and causing parsing errors. Fixes #607698
This commit is contained in:
parent
da70785dcd
commit
8f60eb26f3
1 changed files with 9 additions and 4 deletions
|
@ -533,12 +533,17 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf)
|
|||
|
||||
/* adjust available size for parsing if there's less actual packet data for
|
||||
* parsing than there is data in bytes (for sample see bug 431318) */
|
||||
if (G_UNLIKELY (packet.length != 0 && packet.length < demux->packet_size)) {
|
||||
GST_LOG_OBJECT (demux, "shortened packet, adjusting available data size");
|
||||
if (size < demux->packet_size - packet.length)
|
||||
if (G_UNLIKELY (packet.length != 0 && packet.padding == 0
|
||||
&& packet.length < demux->packet_size)) {
|
||||
GST_LOG_OBJECT (demux, "shortened packet with implicit padding, "
|
||||
"adjusting available data size");
|
||||
if (size < demux->packet_size - packet.length) {
|
||||
/* the buffer is smaller than the implicit padding */
|
||||
goto short_packet;
|
||||
else
|
||||
} else {
|
||||
/* subtract the implicit padding */
|
||||
size -= (demux->packet_size - packet.length);
|
||||
}
|
||||
}
|
||||
|
||||
if (has_multiple_payloads) {
|
||||
|
|
Loading…
Reference in a new issue