mpegaudioparse: relax sync match a bit when draining
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 7 Apr 2011 16:30:49 +0000 (18:30 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 8 Apr 2011 17:07:18 +0000 (18:07 +0100)
... to at least allow initial caps change (but no further caps jitter).
Fixes unit test again after previous change.

gst/audioparsers/gstmpegaudioparse.c

index 9452e57..d3c8d5e 100644 (file)
@@ -548,7 +548,7 @@ gst_mpeg_audio_parse_check_valid_frame (GstBaseParse * parse,
         return FALSE;
       }
     }
-  } else if (draining && lost_sync && caps_change) {
+  } else if (draining && lost_sync && caps_change && mp3parse->rate > 0) {
     /* avoid caps jitter that we can't be sure of */
     *skipsize = off + 2;
     return FALSE;