mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst/typefind/gsttypefindfunctions.c: Avoid integer underflow when the found probability for mp3 is smaller than the '...
Original commit message from CVS: * gst/typefind/gsttypefindfunctions.c: (mp3_type_find_at_offset): Avoid integer underflow when the found probability for mp3 is smaller than the 'penalty' we subtract if there's not a clean mp3 header sync at offset 0.
This commit is contained in:
parent
4607e3d116
commit
67e6bb5a92
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-11-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/typefind/gsttypefindfunctions.c: (mp3_type_find_at_offset):
|
||||
Avoid integer underflow when the found probability for mp3 is
|
||||
smaller than the 'penalty' we subtract if there's not a clean
|
||||
mp3 header sync at offset 0.
|
||||
|
||||
2006-11-21 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/libs/gst-plugins-base-libs-sections.txt:
|
||||
|
|
|
@ -726,7 +726,7 @@ mp3_type_find_at_offset (GstTypeFind * tf, guint64 start_off,
|
|||
GST_MP3_TYPEFIND_TRY_HEADERS / GST_MP3_TYPEFIND_TRY_SYNC;
|
||||
|
||||
if (!headerstart
|
||||
&& ((probability - GST_MP3_WRONG_HEADER) > GST_TYPE_FIND_MINIMUM))
|
||||
&& probability > (GST_TYPE_FIND_MINIMUM + GST_MP3_WRONG_HEADER))
|
||||
probability -= GST_MP3_WRONG_HEADER;
|
||||
if (probability < GST_TYPE_FIND_MINIMUM)
|
||||
probability = GST_TYPE_FIND_MINIMUM;
|
||||
|
|
Loading…
Reference in a new issue