[Bug 723615] New: SIGSEGV when setting preload option in gst_ffmpegmux_setcaps
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Feb 4 08:03:12 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=723615
GStreamer | gst-libav | git
Summary: SIGSEGV when setting preload option in
gst_ffmpegmux_setcaps
Classification: Platform
Product: GStreamer
Version: git
OS/Version: All
Status: UNCONFIRMED
Severity: blocker
Priority: Normal
Component: gst-libav
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: dmitry.m at samsung.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Trying to encode video using libav through gst-libav I faced following problem:
#0 strcmp (p1=0x10040 <Address 0x10040 out of bounds>,
p2=0xb61ee768 "preload") at strcmp.c:38
#1 0xb61e383c in av_opt_find2 (obj=0x1d10c0, name=0xb61ee768 "preload",
unit=0x0, opt_flags=0, search_flags=0, target_obj=0xb33fea4c)
at libavutil/opt.c:663
#2 0xb61e4016 in set_number (obj=0x1d10c0, name=<value optimized out>,
val=<value optimized out>, search_flags=0) at libavutil/opt.c:253
#3 av_opt_set_int (obj=0x1d10c0, name=<value optimized out>,
val=<value optimized out>, search_flags=0) at libavutil/opt.c:264
#4 0xb5e5a796 in gst_ffmpegmux_setcaps (pad=0x1d4e78, parent=0x1d1000,
event=0x8d4888) at gstavmux.c:477
#5 gst_ffmpegmux_sink_event (pad=0x1d4e78, parent=0x1d1000, event=0x8d4888)
at gstavmux.c:520
#6 0xb6be381c in gst_pad_send_event_unchecked (pad=0x1d4e78, event=0x8d4888,
type=<value optimized out>) at gstpad.c:4986
Problem is: code tryes to access field name on object o of type AVOption when o
is invalid.
After investigation I found that problem is cast of method param obj to type
AVClass:
const AVClass *c = *(AVClass**)obj;
AVFormatContext struct contains field av_class of type AVClass* which is 1st
field, so change of code from:
av_opt_set_int(&ffmpegmux->context, "preload", ffmpegmux->preload, 0);
to
av_opt_set_int(&ffmpegmux->context->av_class, "preload",
ffmpegmux->preload, 0); // more readable
or
av_opt_set_int(ffmpegmux->context, "preload", ffmpegmux->preload, 0); //
corrects address passing
fixes my problem.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list