After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 328531 - [matroskamux] doesn't send newsegment event, critical warnings from sinks
[matroskamux] doesn't send newsegment event, critical warnings from sinks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.3.3
Other All
: Normal critical
: 0.10.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-25 07:21 UTC by John Janecek
Modified: 2006-02-06 14:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log dump (29.11 KB, application/octet-stream)
2006-01-25 13:46 UTC, John Janecek
Details

Description John Janecek 2006-01-25 07:21:22 UTC
Please describe the problem:
(gst-launch-0.10:740): GStreamer-CRITICAL **: gst_segment_set_newsegment: assert
ion `segment->format == format' failed

Steps to reproduce:
1. gst-launch filesrc location=ccc.ogg ! decodebin name=decoder decoder. !
queue! audioconvert ! vorbisenc ! matroskamux ! filesink location=rip.mkv
2. gst-launch filesrc location=ccc.ogg ! decodebin name=decoder decoder. !
ffmpegcolorspace ! xvidenc ! matroskamux ! filesink location=rip.mkv
3. 


Actual results:
(gst-launch-0.10:740): GStreamer-CRITICAL **: gst_segment_set_newsegment: assert
ion `segment->format == format' failed

Expected results:


Does this happen every time?
yes

Other information:
recompiled matroskamux with -g flag

in ebml-write.c (line 390) 
seek = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, pos, -1, 0);
  peer_pad = GST_PAD_PEER (ebml->srcpad);
  if (peer_pad) {
    gst_pad_send_event (peer_pad, seek); <--- problem is from here
  } else {
    GST_WARNING_OBJECT (ebml, "Can not seek: no peer pad");
Comment 1 John Janecek 2006-01-25 07:22:26 UTC
I am running gstreamer 0.10 on windows,
matroska plugin is from cvs thought
Comment 2 Edward Hervey 2006-01-25 08:24:34 UTC
could you attach a compressed debug log ?

gst-launch --gst-debug=*:5 .... > log 2>&1
gzip log
Comment 3 John Janecek 2006-01-25 13:46:07 UTC
Created attachment 58090 [details]
log dump

E:\videos>gst-launch --gst-debug=*:5 filesrc location=ccc.ogg ! decodebin name=d
ecoder decoder. ! queue ! audioconvert ! vorbisenc ! matroskamux ! filesink loca
tion=rip.mkv > log 2>&1

Program crashed so not sure if log is useful
Comment 4 Edward Hervey 2006-01-25 14:06:24 UTC
can you resubmit, but this time also give the backtrace :) It doesn't seem to first the same error as in bug description.
Comment 5 John Janecek 2006-01-26 00:59:16 UTC
(In reply to comment #4)
> can you resubmit, but this time also give the backtrace :) It doesn't seem to
> first the same error as in bug description.
> 
Not sure how to do backtrace :( 
I set my env to 
G_DEBUG=fatal_warnings

then i run gst-launch-0.10 in gdb
with filesrc location=ccc.ogg ! decodebin name=decoder decoder. ! queue! audioconvert ! vorbisenc ! matroskamux ! filesink location=rip.mkv

gdb catches the critical error

I go bt in gdb

  • #0 g_logv
    at gmessages.c line 489
  • #1 g_log
    at gmessages.c line 517
  • #2 g_return_if_fail_warning
    at gmessages.c line 532
  • #3 _fu37____gst_debug_enabled
    at gstbasesink.c line 611
  • #4 _fu46____gst_debug_enabled
    at gstbasesink.c line 819
  • #5 gst_pad_send_event
    at gstpad.c line 3672
  • #6 _fu22____gst_debug_enabled
    at matroska/ebml-write.c line 390
  • #7 gst_ebml_write_master_finish
    at matroska/ebml-write.c line 624
  • #8 gst_ebml_write_header
    at matroska/ebml-write.c line 752
  • #9 gst_matroska_mux_start
    at matroska/matroska-mux.c line 1012
  • #10 _fu114____gst_debug_enabled
    at matroska/matroska-mux.c line 1494
  • #11 gst_collect_pads_is_collected
    at gstcollectpads.c line 590
  • #12 _fu205____gst_debug_enabled
    at gstcollectpads.c line 704
  • #13 gst_pad_chain
    at gstpad.c line 3155
  • #14 gst_pad_push
    at gstpad.c line 3254
  • #15 gst_vorbisenc_push_buffer
    at vorbisenc.c line 829
  • #16 _fu38____gst_debug_enabled
    at vorbisenc.c line 971
  • #17 gst_pad_chain
    at gstpad.c line 3155
  • #18 gst_pad_push
    at gstpad.c line 3254
  • #19 gst_base_transform_chain
    at gstbasetransform.c line 1302
  • #20 gst_pad_chain
    at gstpad.c line 3155
  • #21 gst_pad_push
    at gstpad.c line 3254
  • #22 _fu137____gst_debug_enabled
    at gstqueue.c line 808
  • #23 gst_task_func
    at gsttask.c line 186
  • #24 g_thread_pool_thread_proxy
    at gthreadpool.c line 114
  • #25 g_thread_create_proxy
    at gthread.c line 564
  • #26 libgmodule-2!g_module_build_path
    from C:\root\local\bin\libgthread-2.0-0.dll
  • #27 msvcrt!_endthreadex
    from C:\WINDOWS\system32\msvcrt.dll
  • #28 ??
  • #29 ntdll!RtlpNtMakeTemporaryKey
    from ntdll.dll
  • #30 ??
  • #31 ??
  • #32 ??
  • #33 ??
  • #34 ??
  • #35 ??
  • #36 msvcrt!_except_handler2
    from C:\WINDOWS\system32\msvcrt.dll
  • #37 KERNEL32!GetModuleFileNameA
    from C:\WINDOWS\system32\kernel32.dll
  • #38 ??
  • #39 ntdll!RtlpNtMakeTemporaryKey
    from ntdll.dll
  • #40 ??
  • #41 ??
  • #42 ??
  • #43 ??
  • #44 ??
  • #45 ??
  • #46 ??
  • #47 KERNEL32!FindAtomW
    from C:\WINDOWS\system32\kernel32.dll
  • #48 KERNEL32!GetModuleFileNameA
    from C:\WINDOWS\system32\kernel32.dll
  • #49 ??
  • #50 ??
  • #51 ??
  • #52 msvcrt!_endthreadex
    from C:\WINDOWS\system32\msvcrt.dll
  • #53 ??
  • #54 ??
  • #55 libgobject-2!g_object_newv
    from C:\root\local\bin\libgobject-2.0-0.dll

Error: Previous frame inner to this frame (corrupt stack?)

when i climb the stack

Error is being triggered in gstbasesink.c
604	        /* the newsegment event is needed to bring the buffer timestamps to the
 	605	         * stream time and to drop samples outside of the playback segment. */
-	606	        gst_event_parse_new_segment (event, &update, &rate, &format,
 	607	            &start, &stop, &time);
 	608	
-	609	        basesink->have_newsegment = TRUE;
 	610	
-	611	        gst_segment_set_newsegment (&basesink->segment, update, rate, format,
 	612	            start, stop, time); <----------- trigger
 	613	
-	614	        GST_DEBUG_OBJECT (basesink,
 	615	            "received NEWSEGMENT %" GST_TIME_FORMAT " -- %"
 	616	            GST_TIME_FORMAT ", time %" GST_TIME_FORMAT ", accum %"
 	617	            GST_TIME_FORMAT,
 	618	            GST_TIME_ARGS (basesink->segment.start),
 	619	            GST_TIME_ARGS (basesink->segment.stop),
 	620	            GST_TIME_ARGS (basesink->segment.time),
 	621	            GST_TIME_ARGS (basesink->segment.accum));
 	622	        break;
 	623	      }

This is happening because on about line 615 
format = GST_FORMAT_BYTES

segment->format = GST_FORMAT_TIME (it got set before somehow ? )

The place where it is trigger in matroska is in ebml-write.c 
386	
-	387	  seek = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, pos, -1, 0);
-	388	  peer_pad = GST_PAD_PEER (ebml->srcpad);
-	389	  if (peer_pad) {
-	390	    gst_pad_send_event (peer_pad, seek); <----- trigger
 	391	  } else {
-	392	    GST_WARNING_OBJECT (ebml, "Can not seek: no peer pad");
 	393	  }
 	394	
-	395	  ebml->pos = pos;

I am running windowsxp (is that a factor ?)
oggfile ccc.ogg has both video and audio in it, but when i replace matroskamux with oggmux it works fine.

It seems to me as in the basesink->segment is being set or initialize in
GST_FORMAT_TIME, then matroska comes allong and trys to set it in GST_FORMAT_BYTES and it gets upset :(.

Anyway I hope the info is helpful since I am not sure what u mean by backtrace.


Comment 6 Tim-Philipp Müller 2006-02-06 14:30:45 UTC
Should be fixed in CVS, please re-open if it's not.

2006-02-06  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/matroska/ebml-write.c: (gst_ebml_write_reset),
        (gst_ebml_write_flush_cache), (gst_ebml_write_element_push),
        (gst_ebml_write_seek):
        * gst/matroska/ebml-write.h:
          Make sure we send a newsegment event in BYTES format
          before sending buffers (#328531).