aacparse: fix regression in ADIF src caps setting

This commit is contained in:
Mark Nauwelaerts 2010-11-17 15:24:37 +01:00
parent 36cbbd94c6
commit 0fdc68cd46

View file

@ -568,6 +568,11 @@ gst_aacparse_detect_stream (GstAacParse * aacparse,
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (aacparse), 512); 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; *framesize = avail;
return TRUE; return TRUE;
} }
@ -654,6 +659,9 @@ gst_aacparse_parse_frame (GstBaseParse * parse, GstBuffer * buffer)
aacparse = GST_AACPARSE (parse); 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), gst_aacparse_parse_adts_header (aacparse, GST_BUFFER_DATA (buffer),
&rate, &channels, NULL, NULL); &rate, &channels, NULL, NULL);
GST_LOG_OBJECT (aacparse, "rate: %d, chans: %d", rate, channels); 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); aacparse->sample_rate, 1024, 2, 2);
} }
gst_buffer_set_caps (buffer, GST_PAD_CAPS (parse->srcpad));
return ret; return ret;
} }