Commit 67e6bb5a authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

gst/typefind/gsttypefindfunctions.c: Avoid integer underflow when the found...

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.
parent 4607e3d1
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment