diff options
author | René Stadler <rene.stadler@nokia.com> | 2010-12-03 16:54:21 +0200 |
---|---|---|
committer | René Stadler <rene.stadler@nokia.com> | 2010-12-07 21:28:20 +0200 |
commit | 725968c61290fc9f7ba178de187884cbbab894b5 (patch) | |
tree | 43a3a6b5aea86fb8e9c49e62a9b208391a205dd0 | |
parent | 0e39c628785f13bcc728afeeb346b08d78941078 (diff) |
typefind: accept consecutive AC-3 frames of different sizes
This is perfectly valid and occurs in particular when there are
(in)dependent substreams present.
-rw-r--r-- | gst/typefind/gsttypefindfunctions.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 3bfd78a06..84644ca0d 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -1270,13 +1270,14 @@ ac3_type_find (GstTypeFind * tf, gpointer unused) data_scan_ctx_advance (tf, &c_next, frame_size * 2); if (c_next.data[0] == 0x0b && c_next.data[1] == 0x77) { - guint fscod2 = c_next.data[4] >> 6; - guint frmsizecod2 = c_next.data[4] & 0x3f; + fscod = c_next.data[4] >> 6; + frmsizecod = c_next.data[4] & 0x3f; - if (fscod == fscod2 && frmsizecod == frmsizecod2) { + if (fscod < 3 && frmsizecod < 38) { GstTypeFindProbability prob; - GST_LOG ("found second AC3 frame, looks good"); + GST_LOG ("found second AC3 frame (size=%u), looks good", + ac3_frmsizecod_tbl[frmsizecod].frm_size[fscod]); if (c.offset == 0) prob = GST_TYPE_FIND_MAXIMUM; else |