ext/faad/gstfaad.c: Improve the header checking to look for what faad2 looks for too. Fixes playback of same apple tr...
Original commit message from CVS: Patch by: Sjoerd Simons <sjoerd at luon dot net> * ext/faad/gstfaad.c: (looks_like_valid_header): Improve the header checking to look for what faad2 looks for too. Fixes playback of same apple trailers. Fixes bug #469979.
This commit is contained in:
parent
e82812b2dc
commit
e92772a7e9
@ -1,3 +1,12 @@
|
|||||||
|
2008-03-08 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
Patch by: Sjoerd Simons <sjoerd at luon dot net>
|
||||||
|
|
||||||
|
* ext/faad/gstfaad.c: (looks_like_valid_header):
|
||||||
|
Improve the header checking to look for what faad2 looks
|
||||||
|
for too. Fixes playback of same apple trailers.
|
||||||
|
Fixes bug #469979.
|
||||||
|
|
||||||
2008-03-07 Sebastian Dröge <slomo@circular-chaos.org>
|
2008-03-07 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
2
common
2
common
@ -1 +1 @@
|
|||||||
Subproject commit e02bd43fe6b9e45536eccbf5b7a5f9eae62030fd
|
Subproject commit 170f8e91adc7157f6e708ffa58ca22d10e4e45da
|
@ -1141,22 +1141,19 @@ gst_faad_sync (GstBuffer * buf, guint * off)
|
|||||||
static gboolean
|
static gboolean
|
||||||
looks_like_valid_header (guint8 * input_data, guint input_size)
|
looks_like_valid_header (guint8 * input_data, guint input_size)
|
||||||
{
|
{
|
||||||
guint32 rate;
|
if (input_size < 4)
|
||||||
guint32 channels;
|
|
||||||
|
|
||||||
if (input_size < 2)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
rate = ((input_data[0] & 0x7) << 1) | ((input_data[1] & 0x80) >> 7);
|
if (input_data[0] == 'A'
|
||||||
channels = (input_data[1] & 0x78) >> 3;
|
&& input_data[1] == 'D' && input_data[2] == 'I' && input_data[3] == 'F')
|
||||||
|
/* ADIF type header */
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
if (rate == 0xd || rate == 0xe) /* Reserved values */
|
if (input_data[0] == 0xff && (input_data[1] >> 4) == 0xf)
|
||||||
return FALSE;
|
/* ADTS type header */
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
if (channels == 0) /* Extended specifier: never seen one of these */
|
return FALSE;
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
Loading…
x
Reference in New Issue
Block a user