Commit 725968c6 authored by René Stadler's avatar René Stadler
Browse files

typefind: accept consecutive AC-3 frames of different sizes

This is perfectly valid and occurs in particular when there are
(in)dependent substreams present.
parent 0e39c628
......@@ -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
......
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