GNOME Bugzilla – Bug 566959
Fix duration query on mpegtsdemux
Last modified: 2009-01-09 22:31:46 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.
Created attachment 125985 [details] [review] patch
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?
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.
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.
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.
Created attachment 126138 [details] [review] patch better
I think you meant: + if (format == GST_FORMAT_BYTES) { + res = TRUE; to be + if (format == GST_FORMAT_BYTES) { + res = FALSE; ?
Yeah yeah. I give up. I can't write good gstreamer code anymore. :)
If you want to commit the fixed one, go for it :)
Done.