mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +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
|
/* 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) */
|
* parsing than there is data in bytes (for sample see bug 431318) */
|
||||||
if (G_UNLIKELY (packet.length != 0 && packet.length < demux->packet_size)) {
|
if (G_UNLIKELY (packet.length != 0 && packet.padding == 0
|
||||||
GST_LOG_OBJECT (demux, "shortened packet, adjusting available data size");
|
&& packet.length < demux->packet_size)) {
|
||||||
if (size < demux->packet_size - packet.length)
|
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;
|
goto short_packet;
|
||||||
else
|
} else {
|
||||||
|
/* subtract the implicit padding */
|
||||||
size -= (demux->packet_size - packet.length);
|
size -= (demux->packet_size - packet.length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_multiple_payloads) {
|
if (has_multiple_payloads) {
|
||||||
|
|
Loading…
Reference in a new issue