GNOME Bugzilla – Bug 555321
avidemux does not reset its state properly on PAUSED->READY
Last modified: 2009-12-22 10:36:56 UTC
Please describe the problem: gstavidemux.c:gst_avi_demux_reset () does not set several member of GstAviDemux structure. in particular it needs avi->header_state = GST_AVI_DEMUX_HEADER_TAG_LIST; Also gst_avi_demux_parse_stream () removes existing pads an replaces them with new ones for reasons unclear. New pads end up being unlinked. Steps to reproduce: 1. Build test program: gcc -o pipelineplayer `pkg-config --cflags-only-I gstreamer-0.10` pipelineplayer.c `pkg-config --libs gstreamer-0.10` 2. Run the program: ./pipelineplayer 'videotestsrc ! ffmpegcolorspace ! timeoverlay ! ffenc_mpeg4 ! avimux ! avidemux ! ffdec_mpeg4 ! ffmpegcolorspace ! ximagesink' It outputs the pid of its program, and an X11 client window appears. 3. Send HUP signal kill -HUP <pid> Actual results: The X11 client window disappears Expected results: The window should stay and timestamps should restart Does this happen every time? yes Other information: works for the following pipeline: /pipelineplayer 'videotestsrc ! ffmpegcolorspace ! timeoverlay ! ffenc_mpeg4 ! ffdec_mpeg4 ! ffmpegcolorspace ! ximagesink'
Created attachment 120072 [details] testcase to build: gcc -o pipelineplayer `pkg-config --cflags-only-I gstreamer-0.10` pipelineplayer.c `pkg-config --libs gstreamer-0.10`
Dynamically added pads should be removed from the element in PAUSED->READY, which is what avidemux does. The gst-launch logic however will not execute the dynamic pad linking anymore, you'll need to manually handle this dynamic pipeline or reparse the -launch syntax after going to READY.
Seems to work fine in seek.c playbin2. patch below is only for push based operation. * gst/avi/gstavidemux.c: (gst_avi_demux_reset), (gst_avi_demux_parse_subindex), (gst_avi_demux_parse_index): Reset header state. Fixes #555321.