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 758516 - mpegtsbase: Add condition to check for non working negative rate
mpegtsbase: Add condition to check for non working negative rate
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal normal
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-23 02:09 UTC by Vineeth
Modified: 2016-02-17 08:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix critical warning caused because of negative seek not working (1.07 KB, patch)
2015-11-23 02:11 UTC, Vineeth
none Details | Review
fix critical warning caused because of negative seek not working (1.10 KB, patch)
2015-12-24 06:20 UTC, Vineeth
committed Details | Review
refactor code to not handle seek when subclass has no implementation (1.96 KB, patch)
2015-12-24 06:39 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-11-23 02:09:02 UTC
tsdemux is not able to handle negative playback rates.
But in mpegtsbase, the same check is not being done.
So when trying to set negative playback rate for mts files, it throws the below warnings.
Hence added a check to not handle negative rate while seeking.

Could not change playback rate to -1.00.

(gst-play-1.0:7878): GStreamer-WARNING **: gstpad.c:4332:gst_pad_push_data:<tsdemux0:audio_1100> Got data flow before segment event

(gst-play-1.0:7878): GStreamer-WARNING **: gstpad.c:4079:gst_pad_chain_data_unchecked:<multiqueue0:sink_1> Got data flow before segment event

(gst-play-1.0:7878): GStreamer-WARNING **: gstpad.c:4332:gst_pad_push_data:<multiqueue0:src_1> Got data flow before segment event

(gst-play-1.0:7878): GStreamer-WARNING **: gstpad.c:4079:gst_pad_chain_data_unchecked:<ac3parse0:sink> Got data flow before segment event

(gst-play-1.0:7878): GStreamer-WARNING **: gstpad.c:4332:gst_pad_push_data:<ac3parse0:src> Got data flow before segment event

(gst-play-1.0:7878): GStreamer-WARNING **: gstpad.c:4079:gst_pad_chain_data_unchecked:<capsfilter1:sink> Got data flow before segment event

(gst-play-1.0:7878): GStreamer-WARNING **: gstpad.c:4332:gst_pad_push_data:<capsfilter1:src> Got data flow before segment event

(gst-play-1.0:7878): GStreamer-WARNING **: gstpad.c:4079:gst_pad_chain_data_unchecked:<avdec_ac3-0:sink> Got data flow before segment event
Comment 1 Vineeth 2015-11-23 02:11:33 UTC
Created attachment 316066 [details] [review]
fix critical warning caused because of negative seek not working
Comment 2 Vineeth 2015-12-22 06:25:05 UTC
ping :)
Comment 3 Sebastian Dröge (slomo) 2015-12-22 08:55:36 UTC
Review of attachment 316066 [details] [review]:

::: gst/mpegtsdemux/mpegtsbase.c
@@ +1373,3 @@
     return FALSE;
 
+  if (rate <= 0.0) {

This will break reverse playback with HLS for example. A few lines below, for push mode the seek event is forwarded upstream first. The check for negative rates should only happen when not an upstream element but this code here is handling the seek.
Comment 4 Vineeth 2015-12-24 06:20:30 UTC
Created attachment 317843 [details] [review]
fix critical warning caused because of negative seek not working

Moved the check down, so that
upstream is able to handle the reverse playback if it can.
Comment 5 Vineeth 2015-12-24 06:39:49 UTC
Created attachment 317844 [details] [review]
refactor code to not handle seek when subclass has no implementation

This is intended to fix the FIXME
    /* FIXME : Check this before so we don't do seeks we can't handle ? */
If subclass is not able to handle seek then we can simply return FALSE at the beginning.
Comment 6 Vineeth 2016-02-17 06:53:33 UTC
ping :)
Comment 7 Sebastian Dröge (slomo) 2016-02-17 08:53:12 UTC
commit ee8a5455d0b04198e90670ea672859cc30a1ad48
Author: Vineeth TM <vineeth.tm@samsung.com>
Date:   Thu Dec 24 15:36:54 2015 +0900

    mpegtsbase: Refactor code to check for subclass seek handling
    
    If subclass is not able to handle seek event, then there is no need to
    stop streaming and send flush events. We should simply return FALSE
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758516

commit 6676ed6cb0d84173a2051aeb4f19209fb904e444
Author: Vineeth TM <vineeth.tm@samsung.com>
Date:   Thu Dec 24 15:10:16 2015 +0900

    mpegtsbase: Add condition to check for non working negative rate
    
    tsdemux is not able to handle negative playback rates.
    But in mpegtsbase, the same check is not being done.
    added a check to not handle negative rate while seeking unless
    the same is handled upstream.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758516