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 708769 - avdec_mp2float: negotiation error
avdec_mp2float: negotiation error
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
1.2.0
Other Linux
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-25 16:48 UTC by Philippe Normand
Modified: 2013-10-04 11:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philippe Normand 2013-09-25 16:48:52 UTC
When playing http://trac.webkit.org/export/156402/trunk/LayoutTests/media/content/silence.mpg

backtrace:

** (gst-play-1.0:26936): CRITICAL **: gst_audio_decoder_finish_frame: assertion `buf == NULL || GST_AUDIO_INFO_IS_VALID (&ctx->info)' failed
ERROR GStreamer error: negotiation problem. for file:///home/phil/gst/jhbuild/build/WebKit/LayoutTests/media/content/silence.mpg
ERROR debug information: gstavauddec.c(443): gst_ffmpegauddec_negotiate (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/avdec_mp2float:avdec_mp2float0:
Could not set caps for libav decoder (mp2float), not fixed?


g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, 
    args=args@entry=0x7ffff5e652d8) at gmessages.c:981
981		  g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
(gdb) bt
  • #0 g_logv
    at gmessages.c line 981
  • #1 g_log
    at gmessages.c line 1010
  • #2 g_return_if_fail_warning
  • #3 gst_audio_decoder_finish_frame
    at gstaudiodecoder.c line 1025
  • #4 gst_ffmpegauddec_handle_frame
    at gstavauddec.c line 790
  • #5 gst_audio_decoder_push_buffers
    at gstaudiodecoder.c line 1301
  • #6 gst_audio_decoder_chain_forward
    at gstaudiodecoder.c line 1404
  • #7 gst_audio_decoder_chain
    at gstaudiodecoder.c line 1672
  • #8 gst_pad_chain_data_unchecked
    at gstpad.c line 3711
  • #9 gst_pad_push_data
    at gstpad.c line 3941
  • #10 gst_pad_push
    at gstpad.c line 4044
  • #11 gst_base_parse_push_frame
    at gstbaseparse.c line 2280
  • #12 gst_base_parse_handle_and_push_frame
    at gstbaseparse.c line 2102
  • #13 gst_base_parse_finish_frame
    at gstbaseparse.c line 2406
  • #14 gst_mpeg_audio_parse_handle_frame
    at gstmpegaudioparse.c line 768
  • #15 gst_base_parse_handle_buffer
    at gstbaseparse.c line 1956
  • #16 gst_base_parse_scan_frame
    at gstbaseparse.c line 3047
  • #17 gst_base_parse_loop
    at gstbaseparse.c line 3120
  • #18 gst_task_func
    at gsttask.c line 316
  • #19 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #20 g_thread_proxy
    at gthread.c line 798
  • #21 start_thread
    at pthread_create.c line 311
  • #22 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 113

Comment 1 Philippe Normand 2013-09-25 17:00:22 UTC
Seems like the info is indeed not valid :)

(gdb) p ctx->info
$3 = {finfo = 0x7ffff7f96d00 <formats>, flags = GST_AUDIO_FLAG_NONE, 
  layout = GST_AUDIO_LAYOUT_INTERLEAVED, rate = 0, channels = 0, bpf = 0, position = {
    GST_AUDIO_CHANNEL_POSITION_INVALID <repeats 64 times>}, _gst_reserved = {0x0, 0x0, 0x0, 0x0}}
Comment 2 Philippe Normand 2013-09-25 17:11:43 UTC
0:00:00.205556514 27336 0x7f96280df370 DEBUG           audiodecoder gstaudiodecoder.c:701:gst_audio_decoder_set_output_format:<avdec_mp2float0> Setting output format
0:00:00.205585281 27336 0x7f96280df370 WARN            audiodecoder gstaudiodecoder.c:715:gst_audio_decoder_set_output_format:<avdec_mp2float0> Requested output format audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1, channel-mask=(bitmask)0x0000000000000004 do not match template audio/x-raw, layout=(string)interleaved, format=(string){ F32LE, F32LE }
0:00:00.205613233 27336 0x7f96280df370 WARN            audiodecoder gstaudiodecoder.c:744:gst_audio_decoder_set_output_format:<avdec_mp2float0> invalid output format
0:00:00.205626353 27336 0x7f96280df370 WARN                   libav gstavauddec.c:443:gst_ffmpegauddec_negotiate:<avdec_mp2float0> error: Could not set caps for libav decoder (mp2float), not fixed?
0:00:00.205638064 27336 0x7f96280df370 DEBUG            GST_MESSAGE gstelement.c:1804:gst_element_message_full:<avdec_mp2float0> start
0:00:00.205663266 27336 0x7f96280df370 INFO        GST_ERROR_SYSTEM gstelement.c:1835:gst_element_message_full:<avdec_mp2float0> posting message: GStreamer error: negotiation problem.
Comment 3 Philippe Normand 2013-09-30 11:15:54 UTC
I don't understand why decodebin tries to plug avdec_mp2float after the parser instead of, say, mp123audiodec ... This is weird :(
Comment 4 Philippe Normand 2013-10-01 08:19:27 UTC
Well this commit looks a bit suspicious:

commit 90e1c0c21d1e235f550692503b6aebfcbeec165d
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Dec 11 16:46:43 2012 +0000

    avcodecmap: Simplify raw audio caps


before that commit the decoder src pad caps template is:

  SRC template: 'src'
    Availability: Always
    Capabilities:
      audio/x-raw
               channels: [ 1, 2 ]
                   rate: { 48000, 44100, 32000, 24000, 22050, 16000 }
                 format: F32LE
                 layout: interleaved
      audio/x-raw
               channels: [ 1, 2 ]
                   rate: { 48000, 44100, 32000, 24000, 22050, 16000 }
                 format: F32LE
                 layout: interleaved

and after:

  SRC template: 'src'
    Availability: Always
    Capabilities:
      audio/x-raw
                 layout: interleaved
                 format: { F32LE, F32LE }

Was this intended?
Comment 5 Sebastian Dröge (slomo) 2013-10-02 10:11:46 UTC
No, are you sure it's not

commit 64a2a8bdae4c06a0822a994438296b7295fa7da6
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Dec 11 17:25:41 2012 +0000

    avcodecmap: Take channel layout constraints into account if possible

?
Comment 6 Sebastian Dröge (slomo) 2013-10-02 11:02:58 UTC
commit 3e154333de490b603ab80156e0e14e5c585d9125
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Wed Oct 2 12:57:36 2013 +0200

    avcodecmap: Only append values to the video/audio format lists if we don't have them already

commit 3c777545245b4dc6e1e59a637a7ebb8277fc226d
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Wed Oct 2 12:52:35 2013 +0200

    avviddec: Reset some more fields in ::stop()

commit 5f5b6f465c1741e7103a4eb0cbfd385b79fdb98e
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Wed Oct 2 12:51:40 2013 +0200

    avviddec: Don't believe we're negotiated if negotiation failed
    
    It can happen that negotiation fails during get_buffer(), but then
    we don't retry later and never return NOT_NEGOTIATED upstream...
    and instead run into assertions.

commit 9febec71c0b35ed2ea0b8d24c949013fb57bceda
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Wed Oct 2 12:45:44 2013 +0200

    avauddec: Don't believe we're negotiated if negotiation failed
    
    It can happen that negotiation fails during get_buffer(), but then
    we don't retry later and never return NOT_NEGOTIATED upstream...
    and instead run into assertions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708769
Comment 7 Philippe Normand 2013-10-04 07:18:46 UTC
Thanks Sebastian!