aacparse: Reset parser when we have caps without codec_data

This ensures the detection (and proper downstream caps settings) will
actually happen when we have new incoming caps without codec_data.

This was easily triggered by streams from matroskademux which initially
provided caps with a constructed codec_data, but then pushed new caps
without the codec_data once it detected the stream was adts.
This commit is contained in:
Edward Hervey 2012-07-24 12:22:08 +02:00
parent f44808338f
commit 538c131b37

View file

@ -271,6 +271,9 @@ gst_aac_parse_sink_setcaps (GstBaseParse * parse, GstCaps * caps)
gst_structure_get_int (structure, "rate", &aacparse->sample_rate);
gst_structure_get_int (structure, "channels", &aacparse->channels);
} else {
aacparse->sample_rate = 0;
aacparse->channels = 0;
aacparse->header_type = DSPAAC_HEADER_NOT_PARSED;
gst_base_parse_set_passthrough (parse, FALSE);
}