[gstreamer-bugs] [Bug 332031] [PATCH] avimux ported to 0.10

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Thu Apr 27 08:00:12 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=332031
 GStreamer | gst-plugins-good | Ver: 0.10.2


Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #63994|commented-on                |committed
               Flag|                            |
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|HEAD                        |0.10.3




------- Comment #10 from Tim-Philipp Müller  2006-04-27 15:00 UTC -------
Tested and committed to CVS - Worked out of the box for me, nice job!

2006-04-27  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Mark Nauwelaerts  <manauw at skynet dot be>

        * gst/avi/Makefile.am:
        * gst/avi/gstavi.c: (plugin_init):
        * gst/avi/gstavimux.c: (gst_avi_mux_get_type),
        (gst_avi_mux_base_init), (gst_avi_mux_finalize),
        (gst_avi_mux_class_init), (gst_avi_mux_init),
        (gst_avi_mux_vidsink_set_caps), (gst_avi_mux_audsink_set_caps),
        (gst_avi_mux_pad_link), (gst_avi_mux_pad_unlink),
        (gst_avi_mux_request_new_pad), (gst_avi_mux_release_pad),
        (gst_avi_mux_write_tag), (gst_avi_mux_riff_get_avi_header),
        (gst_avi_mux_riff_get_avix_header),
        (gst_avi_mux_riff_get_video_header),
        (gst_avi_mux_riff_get_audio_header), (gst_avi_mux_add_index),
        (gst_avi_mux_write_index), (gst_avi_mux_bigfile),
        (gst_avi_mux_start_file), (gst_avi_mux_stop_file),
        (gst_avi_mux_restart_file), (gst_avi_mux_handle_event),
        (gst_avi_mux_fill_queue), (gst_avi_mux_send_pad_data),
        (gst_avi_mux_strip_buffer), (gst_avi_mux_do_audio_buffer),
        (gst_avi_mux_do_video_buffer), (gst_avi_mux_do_one_buffer),
        (gst_avi_mux_loop), (gst_avi_mux_collect_pads),
        (gst_avi_mux_get_property), (gst_avi_mux_set_property),
        (gst_avi_mux_change_state):
        * gst/avi/gstavimux.h:
          Port AVI muxer to GStreamer-0.10 (#332031).

        * tests/check/Makefile.am:
        * tests/check/elements/avimux.c:
        * tests/check/elements/.cvsignore:
          Add unit test for AVI muxer.

My above statement about gst_avimux_handle_event() leaking the list was
rubbish, we don't get a copy of the list, so your original code there was
correct.

However, I found I had to add a

    avimux->audiocollectdata = NULL;
and
    avimux->videocollectdata = NULL;

in gst_avi_mux_pad_unlink() though to avoid an invalid memory access when using
both a video stream and an audio stream. This doesn't happen with the unit test
though.


Test pipeline:

 $ OIL_CPU_FLAGS=0 G_SLICE=always-malloc valgrind --leak-check=yes
gst-launch-0.10 videotestsrc num-buffers=500 !
video/x-raw-yuv,format=\(fourcc\)I420,width=320,height=240 ! xvidenc !  queue !
mux.  audiotestsrc num-buffers=500 ! audioconvert !
audio/x-raw-int,rate=44100,channels=2 ! lame ! queue ! mux.  avimux name=mux !
filesink location=test.avi


-- 
Configure bugmail: http://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