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 778164 - Don't switch track and use future list if active stream is not ready
Don't switch track and use future list if active stream is not ready
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.11.1
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-04 05:05 UTC by HoonHee Lee
Modified: 2018-11-03 11:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log for decodebin3 (75.39 KB, application/force-download)
2017-02-04 05:05 UTC, HoonHee Lee
  Details
decodebin3: Don't switch track and use future list if active stream is not ready (1.10 KB, patch)
2017-02-04 05:07 UTC, HoonHee Lee
none Details | Review

Description HoonHee Lee 2017-02-04 05:05:23 UTC
Created attachment 344911 [details]
Log for decodebin3

Hello All.
Segmentation fault is happened sometimes when audio track is changed immediately after initial prerolling(async-done) is completed.
 
Collection information. 
========================================================
cat gst.log | grep "gstdecodebin3.c" | grep "handle_stream_collection"
0:00:01.978901460  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1459:handle_stream_collection:<decodebin3-0> Setting collection 0x72b12928 on input 0x178470
0:00:01.978947501  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1467:handle_stream_collection: Received Stream Collection. Upstream_id : 700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d
0:00:01.978968251  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1468:handle_stream_collection: From input 0x178470
0:00:01.979002043  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1469:handle_stream_collection:   3 streams
0:00:01.979026126  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1475:handle_stream_collection:    Stream '700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/001'
0:00:01.979048001  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1477:handle_stream_collection:      type  : video
0:00:01.979067460  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1478:handle_stream_collection:      flags : 0x0
0:00:01.979131168  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1480:handle_stream_collection:      tags  : taglist, video-codec=(string)"H.264\ /\ AVC", track-id=(uint)1;
0:00:01.979178210  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1482:handle_stream_collection:      caps  : video/x-h264, stream-format=(string)avc, alignment=(string)au, container=(string)"ISO\ MP4/M4A", format=(string)avc1, timestamptype=(boolean)true, level=(string)4, profile=(string)high, codec_data=(buffer)01640028ffe1002f67640028ac2ce5014016ec0502000007d0000186a1d180043280017d7d7bdf1a30008650002fafaf7be1f08844858001000468ffbcb0fdf8f800, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1
0:00:01.979302293  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1475:handle_stream_collection:    Stream '700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/002'
0:00:01.979323751  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1477:handle_stream_collection:      type  : audio
0:00:01.979342626  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1478:handle_stream_collection:      flags : 0x0
0:00:01.979362168  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1480:handle_stream_collection:      tags  : taglist, audio-codec=(string)"EAC-3\ audio", language-code=(string)de, track-id=(uint)2;
0:00:01.979397251  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1482:handle_stream_collection:      caps  : audio/x-eac3, framed=(boolean)true, rate=(int)48000, channels=(int)2
0:00:01.979447418  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1475:handle_stream_collection:    Stream '700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/003'
0:00:01.979469918  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1477:handle_stream_collection:      type  : audio
0:00:01.979489085  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1478:handle_stream_collection:      flags : 0x0
0:00:01.979508335  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1480:handle_stream_collection:      tags  : taglist, audio-codec=(string)"EAC-3\ audio", language-code=(string)en, track-id=(uint)3;
0:00:01.979543376  4249   0x2f9c60 DEBUG             decodebin3 gstdecodebin3.c:1482:handle_stream_collection:      caps  : audio/x-eac3, framed=(boolean)true, rate=(int)48000, channels=(int)2
========================================================
 
Active stream of multiqueue0:src_2(2nd audio track) is ready after changing audio track. Thus, Crash is happened.
========================================================
0:00:02.261227918  4249   0x241d80 DEBUG             decodebin3 gstdecodebin3.c:1754:multiqueue_src_probe:<multiqueue0:src_2> Got event 0x721aee70 stream-start
0:00:02.261315293  4249   0x241d80 DEBUG             decodebin3 gstdecodebin3.c:1768:multiqueue_src_probe:<multiqueue0:src_2> Stream Start '700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/003'
0:00:02.261372293  4249   0x241d80 DEBUG             decodebin3 gstdecodebin3.c:1754:multiqueue_src_probe:<multiqueue0:src_2> Got event 0x71706188 caps
========================================================


========================================================
cat gst.log | grep "gstdecodebin3.c" | grep "handle_stream_switch"
0:00:02.228173001  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2555:handle_stream_switch:<decodebin3-0> Checking stream '700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/001'
0:00:02.228201335  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2572:handle_stream_switch:<decodebin3-0> Stream '700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/001' from slot 0x721b9510 is already active on output 0x71700d40
0:00:02.228231543  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2555:handle_stream_switch:<decodebin3-0> Checking stream '700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/003'
0:00:02.228256668  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2567:handle_stream_switch:<decodebin3-0> We need to activate slot 0x721bb8c0 for stream '700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/003')
0:00:02.228379793  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2599:handle_stream_switch:<decodebin3-0> Slot 0x721b9cd0 (700b33270de0626842783cd41367760d89e939be6afa274c89f726e21284095d/002) should be deactivated, no longer used
0:00:02.228405710  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2606:handle_stream_switch:<decodebin3-0> Check if we can reassign slots
0:00:02.228424543  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2618:handle_stream_switch:<decodebin3-0> Checking if slot to deactivate (0x721b9cd0) has a candidate slot to activate
0:00:02.228446918  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2621:handle_stream_switch:<decodebin3-0> Comparing to slot 0x721bb8c0
0:00:02.228467668  4249    0x8cac0 DEBUG             decodebin3 gstdecodebin3.c:2623:handle_stream_switch:<decodebin3-0> Re-using
======================================================
 
Following code is crash point in handle_stream_switch ().
=====================================
to_reassign = g_list_append (to_reassign, (gchar *)
              gst_stream_get_stream_id (slot_to_activate->active_stream));
=====================================
Comment 1 HoonHee Lee 2017-02-04 05:07:28 UTC
Created attachment 344912 [details] [review]
decodebin3: Don't switch track and use future list if active stream is not ready

Please review my patch if it is acceptable.
 
Thanks.
Comment 2 GStreamer system administrator 2018-11-03 11:54:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/335.