In case of reusing aacparse ,Not working as expected

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

In case of reusing aacparse ,Not working as expected

vijaypalaniswamy
Hi All,

If we reuse the audio parser [aacparse] in the pipeline [Reusing: By setting pipeline to NULL and again set to playing]

Eg: Try to play file "test.aac" and play the same file by reusing the pipeline.

Getting below error:
baseparse gstbaseparse.c:2596:gst_base_parse_push_frame:<aacparse0> error: No caps set

The above failuer is due to check in function "gst_aac_parse_handle_frame"
      if (G_UNLIKELY (rate != aacparse->sample_rate
            || channels != aacparse->channels)) {

But if we play different stream with different channels & sampling rate, above check will be success and set caps will be called.

I tried with below fix by initializing all private member variables in "gst_aac_parse_start". With this fix its working fine

+  aacparse->object_type = 0;
+  aacparse->bitrate = 0;
+  aacparse->header_type = DSPAAC_HEADER_NOT_PARSED;
+  aacparse->output_header_type = DSPAAC_HEADER_NOT_PARSED;
+  aacparse->channels = 0;
+  aacparse->sample_rate = 0;

The issue is with channels and sample_rate but i initialized all the values.

Please help me to solve the issue.

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: In case of reusing aacparse ,Not working as expected

Tim Müller
On Tue, 2017-05-23 at 04:54 -0700, vijaypalaniswamy wrote:

Hi,

> If we reuse the audio parser [aacparse] in the pipeline [Reusing: By
> setting pipeline to NULL and again set to playing]
> ...
> Getting below error:
> baseparse gstbaseparse.c:2596:gst_base_parse_push_frame:<aacparse0>
> error: No caps set
> ...
> I tried with below fix by initializing all private member variables
> in
> "gst_aac_parse_start". With this fix its working fine
>
> +  aacparse->object_type = 0;
> +  aacparse->bitrate = 0;
> +  aacparse->header_type = DSPAAC_HEADER_NOT_PARSED;
> +  aacparse->output_header_type = DSPAAC_HEADER_NOT_PARSED;
> +  aacparse->channels = 0;
> +  aacparse->sample_rate = 0;
>
> The issue is with channels and sample_rate but i initialized all the
> values.

Please could you file a bug in bugzilla and attach your patch there?
(in git format-patch format) Thanks!

Cheers
 -Tm

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: In case of reusing aacparse ,Not working as expected

vijaypalaniswamy
This post was updated on .
I filed bug in bugzilla and attached the patch

https://bugzilla.gnome.org/show_bug.cgi?id=783027

Thank you