After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 569441 - Use AVCodec.sample_fmts for list of compatible sample formats.
Use AVCodec.sample_fmts for list of compatible sample formats.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-28 10:47 UTC by Sebastien Merle
Modified: 2009-01-29 06:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Merle 2009-01-28 10:47:59 UTC
In previous version of gst-ffmpeg, the encoder ffenc_adpcm_yamaha was only accepting sample depth of 16. Now it accepts depth of 32 but then generate
a corrupted stream when decoded.

This works on old and new versions:

gst-launch-0.10 -v audiotestsrc ! audio/x-raw-int,width=16,depth=16 ! ffenc_adpcm_yamaha ! ffdec_adpcm_yamaha ! alsasink

This was failing with the error "could not link audiotestsrc0 to ffenc_adpcm_yamaha0", and now it plays noise:

gst-launch-0.10 -v audiotestsrc ! audio/x-raw-int,width=32,depth=32 ! ffenc_adpcm_yamaha ! ffdec_adpcm_yamaha ! alsasink
Comment 1 Edward Hervey 2009-01-29 06:48:15 UTC
So the generic problem is that, for codecs that implement it, we don't look at AVCodec->sample_fmts which lists the sample formats compatible with that codec.

If that field is empty, it means it supports any sample formats.
Comment 2 Edward Hervey 2009-01-29 06:51:55 UTC
commit 9fc91546ea91af0b6f14418b8ec26abf64b0cc72
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Thu Jan 29 07:48:19 2009 +0100

    Only use valid SampleFormat for audio encoders/decoders.
    
    For a given AVCodec, when the sample_fmts field is non-NULL, that means that
    that codec can only handle a specific set of SampleFormat.
    With this patch, we now look for its presence and create the proper pad template
    caps.
    Fixes #569441