From: Mark Nauwelaerts Date: Wed, 17 Nov 2010 14:24:37 +0000 (+0100) Subject: aacparse: fix regression in ADIF src caps setting X-Git-Tag: 1.19.3~507^2~16183 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fdc68cd46b90d1f9c102c4870a4a6b755c8df4a;p=platform%2Fupstream%2Fgstreamer.git aacparse: fix regression in ADIF src caps setting --- diff --git a/gst/audioparsers/gstaacparse.c b/gst/audioparsers/gstaacparse.c index 9f02825..f5ecd4e 100644 --- a/gst/audioparsers/gstaacparse.c +++ b/gst/audioparsers/gstaacparse.c @@ -568,6 +568,11 @@ gst_aacparse_detect_stream (GstAacParse * aacparse, gst_base_parse_set_min_frame_size (GST_BASE_PARSE (aacparse), 512); + /* arrange for metadata and get out of the way */ + gst_aacparse_set_src_caps (aacparse, + GST_PAD_CAPS (GST_BASE_PARSE_SINK_PAD (aacparse))); + gst_base_parse_set_passthrough (GST_BASE_PARSE (aacparse), TRUE); + *framesize = avail; return TRUE; } @@ -654,6 +659,9 @@ gst_aacparse_parse_frame (GstBaseParse * parse, GstBuffer * buffer) aacparse = GST_AACPARSE (parse); + if (G_UNLIKELY (aacparse->header_type != DSPAAC_HEADER_ADTS)) + return ret; + gst_aacparse_parse_adts_header (aacparse, GST_BUFFER_DATA (buffer), &rate, &channels, NULL, NULL); GST_LOG_OBJECT (aacparse, "rate: %d, chans: %d", rate, channels); @@ -673,7 +681,6 @@ gst_aacparse_parse_frame (GstBaseParse * parse, GstBuffer * buffer) aacparse->sample_rate, 1024, 2, 2); } - gst_buffer_set_caps (buffer, GST_PAD_CAPS (parse->srcpad)); return ret; }