]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
[PATCH] dvb: fix bug in demux that caused lost mpeg sections
authorMark Adams <mark147m@gmail.com>
Wed, 9 Nov 2005 05:35:50 +0000 (21:35 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 9 Nov 2005 15:56:05 +0000 (07:56 -0800)
commitb3967d6c251d8482fe42a1aad3cc292ee04c0a6b
treeb885c08047d209504a4b774bc07b641c51a8721e
parentf0fa86a574843264bdcbed4c84b41a2778861fde
[PATCH] dvb: fix bug in demux that caused lost mpeg sections

Fix a bug in the software demux which causes large MPEG sections to be lost
when they follow very small sections.

The problem happens when two sections begin in the same transport packet.  The
dvb_demux code resets its buffer only before the first of these sections.
This means that when the second (or subsequent) section begins, there is up to
182 bytes of buffer space already used.  If the following section is close to
the maximum size, it currently won't fit in the (4096-byte) buffer and is
thrown away.

The fix is simply to enlarge the buffer by the size of one transport packet
and correct one usage of the SECFEED_SIZE definition where what is really
meant is the maximum size of a section.

Signed-off-by: Mark Adams <mark147m@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/dvb/dvb-core/demux.h
drivers/media/dvb/dvb-core/dvb_demux.c