Discussion:
[Bug 793981] New: vaapi/mpeg2: segment fault when rewind mpeg2 video
"GStreamer" (GNOME Bugzilla)
2018-03-02 07:58:48 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

Bug ID: 793981
Summary: vaapi/mpeg2: segment fault when rewind mpeg2 video
Classification: Platform
Product: GStreamer
Version: 1.12.x
OS: Linux
Status: NEW
Severity: major
Priority: Normal
Component: gstreamer-vaapi
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@gmail.com
QA Contact: gstreamer-***@lists.freedesktop.org
CC: ***@gmail.com, ***@igalia.com
GNOME version: ---

I try rewind mpeg2 video(set playback rate to -1), however, segment fault
caused at gstvaapidecoder_mpeg2.c:1461, traced by gdb, I found that packet.data
value is 0x0. So, I think it is necessary to judge the value of packet.data
before 1461, how do you think?
Else, It was strange to me why packet.data was 0x0 when rewind, and it was a
valid value when playback normally, Dose mpeg2 video not support rewinding?

souce code:
--------------------------------------------------------------------
1454 if (!gst_buffer_map (buffer, &map_info, GST_MAP_READ)) {
1455 GST_ERROR ("failed to map buffer");
1456 return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
1457 }
1458
1459 packet.data = map_info.data + unit->offset;
1460 packet.size = unit->size;
1461 packet.type = packet.data[3];
1462 packet.offset = 4;
--------------------------------------------------------------------
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-03-02 08:00:24 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

Chenglin Ye <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-03-02 17:25:03 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

Víctor Manuel Jáquez Leal <***@igalia.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|vaapi/mpeg2: segment fault |vaapi/mpeg2: segment fault
|when rewind mpeg2 video |when reverse playback
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-03-02 17:28:08 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

--- Comment #1 from Víctor Manuel Jáquez Leal <***@igalia.com> ---
It seems that mpeg2 doesn't support reverse playaback. Even gst-libav fails
(graciously) to play in reverse mpeg2. Even yet, mpeg2 containers refuse to
play in reverse mode.

But I'm not sure were this, among the stack, should be fixed.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-03-02 17:33:44 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

--- Comment #2 from Víctor Manuel Jáquez Leal <***@igalia.com> ---
Looks like mpeg2 reverse playback is a hard problem

https://stackoverflow.com/questions/9392152/mpeg-backwards-frame-decoding-using-ffmpeg
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-03-03 15:53:49 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

--- Comment #3 from Víctor Manuel Jáquez Leal <***@igalia.com> ---
Created attachment 369225
--> https://bugzilla.gnome.org/attachment.cgi?id=369225&action=edit
libs: decoder: mpeg2: bail out if not enough data in buffer

Naive solution checking if there is enough data in the buffer to
decode. This happens when the containers wrongly permits reverse
playback of mpeg2 streams.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-03-03 15:54:57 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

Víctor Manuel Jáquez Leal <***@igalia.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-03-14 03:27:28 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

--- Comment #4 from Chenglin Ye <***@gmail.com> ---
I got it.

Thanks for taking time to confirm this 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)
2018-11-03 15:53:36 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=793981

GStreamer system administrator <***@gstreamer.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |OBSOLETE

--- Comment #5 from GStreamer system administrator <***@gstreamer.net> ---
-- 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/gstreamer-vaapi/issues/87.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...