Discussion:
[Bug 765660] New: baseparse: use gst_util_uint64_scale to avoid overflow.
Add Reply
"GStreamer" (GNOME Bugzilla)
2016-04-27 08:39:09 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

Bug ID: 765660
Summary: baseparse: use gst_util_uint64_scale to avoid
overflow.
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gstreamer (core)
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@gmail.com
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---

use gst_util_uint64_scale_int will overflow as parse->priv->avg_bitrate
is unsigned int.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-27 08:40:22 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

--- Comment #1 from kevin <***@gmail.com> ---
Created attachment 326842
--> https://bugzilla.gnome.org/attachment.cgi?id=326842&action=edit
Patch to fix the issue.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-27 08:42:38 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

--- Comment #2 from kevin <***@gmail.com> ---
Will have below log without the patch for large bitrate stream.

(gplay-1.0:2125): GStreamer-CRITICAL **: _gst_util_uint64_scale_int: assertion
'denom > 0' failed
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-27 08:44:48 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

--- Comment #3 from Sebastian Dröge (slomo) <***@coaxion.net> ---
You get diffs or avg bitrates higher than 2 billion bits per second but less
than 4 billion? There might be other problematic places related to the bitrate,
and if you already get into those dimensions it might make sense to convert it
to a 64 bit integer, and/or store it as bytes per second (do we already?), etc.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-28 10:45:27 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

Sebastian Dröge (slomo) <***@coaxion.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
CC| |***@coaxion.net

--- Comment #4 from Sebastian Dröge (slomo) <***@coaxion.net> ---
Can you provide a stream where this happens btw?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-29 02:24:18 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

--- Comment #5 from kevin <***@gmail.com> ---
I found the root cause is the special stream report invalid fps. It report
90000fps. So the calculate bitrate is very large and cause overflow.

We can add one invalid fps check in our special demuxer to fix the issue.

Our demuxer can demux the special stream. tsdemux will report fail.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-29 02:30:03 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

--- Comment #6 from kevin <***@gmail.com> ---
How to share large video file to you? video file size is 65M.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-29 06:35:13 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

--- Comment #7 from Sebastian Dröge (slomo) <***@coaxion.net> ---
Use something like dropbox. If tsdemux fails on it, we should make it work :)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-29 08:45:31 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

--- Comment #8 from kevin <***@gmail.com> ---
Please get the video file:

https://www.dropbox.com/s/4aoeexntsu77jul/HD_8M.mpg?dl=0
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-29 08:58:34 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

Sebastian Dröge (slomo) <***@coaxion.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW

--- Comment #9 from Sebastian Dröge (slomo) <***@coaxion.net> ---
Ok, this fails because "mpegtsbase.c:1328:mpegts_base_scan:<tsdemux0> Couldn't
find any PCR within the first 655360 bytes". Where is the PCR? :)


Can you open another bug against tsdemux for this specific file? Inside
baseparse what should happen probably is to guard against overflows not only in
this place but in general, I don't think your patch is complete here as it
could still overflow (bitrate is still an int).
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-04-29 08:58:46 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

Sebastian Dröge (slomo) <***@coaxion.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #326842|none |needs-work
status| |
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2016-11-11 18:38:31 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

Tim-Philipp Müller <***@zen.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@zen.co.uk

--- Comment #10 from Tim-Philipp Müller <***@zen.co.uk> ---
What shall we do with this? mpegtsbase warning still happens.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-17 12:33:07 UTC
Reply
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=765660

***@imgtec.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@imgtec.com

--- Comment #11 from ***@imgtec.com ---
Created attachment 346063
--> https://bugzilla.gnome.org/attachment.cgi?id=346063&action=edit
baseparse: reset data_bytecount in gst_base_parse_reset

I have usecase where we have master on one unit and slave on another. Master
encoder pcm data in flac and send over to slave. On slave we dont recreate
pipeline but reset the flacparser when new stream-start is detected to fix it
internal variable. In this scenario i have seen
GStreamer-CRITICAL **: _gst_util_uint64_scale_int: assertion 'denom > 0' failed
when you change the track etc.

Proposed fix fixes the issue for me, it actually reset one of the variable
which get used to calculate avg_buffer.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...