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 566959 - Fix duration query on mpegtsdemux
Fix duration query on mpegtsdemux
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal blocker
: 0.10.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-07 23:26 UTC by David Schleef
Modified: 2009-01-09 22:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (830 bytes, patch)
2009-01-07 23:27 UTC, David Schleef
none Details | Review
patch (798 bytes, patch)
2009-01-09 20:59 UTC, David Schleef
none Details | Review

Description David Schleef 2009-01-07 23:26:33 UTC
Patch adds a duration query for mpegtsdemux by responding with GST_CLOCK_TIME_NONE.  This is certainly not the best thing to do, but currently other elements are responding with garbage.
Comment 1 David Schleef 2009-01-07 23:27:20 UTC
Created attachment 125985 [details] [review]
patch
Comment 2 Jan Schmidt 2009-01-07 23:33:11 UTC
What do you mean, responding with garbage? Is one of the parsers/decoders estimating a bogus duration based on a successful BYTES duration query or something?
Comment 3 David Schleef 2009-01-07 23:49:24 UTC
That is what I'm guessing.  I didn't look into it very deeply.

This patch has the side effect of not proxying DURATION requests in BYTES.  Which likely means that whatever element that is interpreting the BYTES duration incorrectly is no longer doing so.  It is my understanding that demuxers should only proxy DURATION queries in TIME.
Comment 4 Jan Schmidt 2009-01-08 09:10:11 UTC
That's what I thought. It doesn't look like the right fix to me. The demuxer should refuse duration requests in BYTES, proxy duration requests in other formats upstream to see if they succeed, and return FALSE to refuse the query if upstream doesn't know.

There are cases where we might get a MPEG-TS stream off a network object that knows the duration upstream, even if the demuxer itself doesn't.
Comment 5 Zaheer Abbas Merali 2009-01-09 16:03:00 UTC
I agree with Jan. I don't think we should be responding with GST_CLOCK_TIME_NONE.

I also agree that we should refuse the BYTES duration requests.
Comment 6 David Schleef 2009-01-09 20:59:14 UTC
Created attachment 126138 [details] [review]
patch

better
Comment 7 Jan Schmidt 2009-01-09 21:28:31 UTC
I think you meant:
+      if (format == GST_FORMAT_BYTES) {
+        res = TRUE;

to be
+      if (format == GST_FORMAT_BYTES) {
+        res = FALSE;

?
Comment 8 David Schleef 2009-01-09 21:45:47 UTC
Yeah yeah.

I give up.  I can't write good gstreamer code anymore.  :)
Comment 9 Jan Schmidt 2009-01-09 21:52:54 UTC
If you want to commit the fixed one, go for it :)
Comment 10 David Schleef 2009-01-09 22:09:52 UTC
Done.