[Bug 748700] New: avimux: stopping file without index fails
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Apr 30 05:10:39 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=748700
Bug ID: 748700
Summary: avimux: stopping file without index fails
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-good
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: knorr.jesper at gmail.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 302641
--> https://bugzilla.gnome.org/attachment.cgi?id=302641&action=edit
avimux: Check for NULL index before writing it
Sending eos to avimux with a video sink pad that has not received any buffers
causes a critical:
GStreamer-CRITICAL **: gst_memory_new_wrapped: assertion 'data != NULL' failed
The problem is that the muxer tries to write the index, even though it is not
available.
#0 g_logv (log_domain=0x7ffff7b81ac5 <g_log_domain_gstreamer> "GStreamer",
log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>,
args=args at entry=0x7fffffffd378) at gmessages.c:1046
#1 0x00007ffff758dcc2 in g_log (log_domain=<optimized out>,
log_level=log_level at entry=G_LOG_LEVEL_CRITICAL,
format=format at entry=0x7ffff75fa63d "%s: assertion '%s' failed") at
gmessages.c:1079
#2 0x00007ffff758dce9 in g_return_if_fail_warning (log_domain=<optimized out>,
pretty_function=pretty_function at entry=0x7ffff7b82670 <__func__.17666>
"gst_memory_new_wrapped",
expression=expression at entry=0x7ffff7b911d5 "data != NULL") at
gmessages.c:1088
#3 0x00007ffff7af256a in gst_memory_new_wrapped (flags=flags at entry=(unknown:
0), data=0x0, maxsize=maxsize at entry=0, offset=offset at entry=0,
size=size at entry=0, user_data=<optimized out>,
notify=0x7ffff758c650 <g_free>) at gstallocator.c:620
#4 0x00007ffff4a4dba2 in gst_avi_mux_write_index
(avimux=avimux at entry=0x78f130) at gstavimux.c:1601
#5 0x00007ffff4a520d8 in gst_avi_mux_stop_file (avimux=avimux at entry=0x78f130)
at gstavimux.c:1789
#6 0x00007ffff4a52a28 in gst_avi_mux_do_one_buffer (avimux=0x78f130) at
gstavimux.c:2190
#7 gst_avi_mux_collect_pads (pads=<optimized out>, avimux=0x78f130) at
gstavimux.c:2207
#8 0x00007ffff5d9aaf6 in gst_collect_pads_check_collected
(pads=pads at entry=0x7910d0) at gstcollectpads.c:1323
#9 0x00007ffff5d9d6f9 in gst_collect_pads_event_default
(pads=pads at entry=0x7910d0, data=data at entry=0x680f10,
event=event at entry=0x794b30, discard=discard at entry=0) at gstcollectpads.c:1767
#10 0x00007ffff4a530a4 in gst_avi_mux_handle_event (pads=0x7910d0,
data=0x680f10, event=0x794b30, user_data=0x78f130) at gstavimux.c:1926
#11 0x00007ffff5d9a3ea in gst_collect_pads_event (pad=pad at entry=0x782ba0,
parent=parent at entry=0x78f130, event=event at entry=0x794b30) at
gstcollectpads.c:1989
#12 0x00007ffff7b2b53a in gst_pad_send_event_unchecked (pad=pad at entry=0x782ba0,
event=event at entry=0x794b30, type=<optimized out>) at gstpad.c:5358
#13 0x00007ffff7b354f7 in gst_pad_send_event (pad=pad at entry=0x782ba0,
event=0x794b30) at gstpad.c:5525
#14 0x00000000004011dd in sighandle (signo=<optimized out>) at avimux-test.c:44
#15 <signal handler called>
#16 0x00007ffff704812d in poll () at ../sysdeps/unix/syscall-template.S:81
#17 0x00007ffff7586f34 in g_main_context_poll (priority=2147483647, n_fds=2,
fds=0x681fe0, timeout=-1, context=0x67d310) at gmain.c:4103
#18 g_main_context_iterate (context=0x67d310, block=block at entry=1,
dispatch=dispatch at entry=1, self=<optimized out>) at gmain.c:3803
#19 0x00007ffff758726a in g_main_loop_run (loop=0x61b520) at gmain.c:4002
#20 0x000000000040105d in main (argc=1, argv=0x7fffffffe0d8) at
avimux-test.c:100
I have a test case, where I create the pipeline:
videotestsrc ! x264enc ! avimux ! fakesink
I put a blocking probe on the src pad of x264enc, and drop the first buffer
showing up. avimux never receives any buffers.
On SIGINT I send an EOS event to the avimux sinkpad, which causes the
assertion.
I have attached a patch that checks for a valid index before writing the index
from gst_avi_mux_stop_file.
Maybe we want to skip rewriting the header altogether since we are dealing with
an empty file anyway?
--
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