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 369627 - [mpeg2dec] unit test addition and memleak fix
[mpeg2dec] unit test addition and memleak fix
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: 0.10.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-02 20:26 UTC by Sebastian Dröge (slomo)
Modified: 2006-11-15 11:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstmpeg2dec-tests.diff (30.75 KB, patch)
2006-11-02 20:27 UTC, Sebastian Dröge (slomo)
none Details | Review
mpeg2dec.diff (1.56 KB, patch)
2006-11-02 20:27 UTC, Sebastian Dröge (slomo)
committed Details | Review
gstmpeg2dec-tests.diff (71.94 KB, patch)
2006-11-02 21:12 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2006-11-02 20:26:57 UTC
Hi,
the first patch adds a minimal unit test for mpeg2dec. The one test tries to decode a correct stream.

The second patch fixes a memleak in gstmpeg2dec which showed up by running the above unit test in valgrind.

It might be sane to add the mpeg2dec unit test to VALGRIND_TESTS_DISABLE because libmpeg2 might be not valgrind clean on some archs with some optimizations. At least on PPC/altivec it crashes with valgrind (but runs fine without), might be a valgrind/altivec bug.

Bye
Comment 1 Sebastian Dröge (slomo) 2006-11-02 20:27:33 UTC
Created attachment 75886 [details] [review]
gstmpeg2dec-tests.diff
Comment 2 Sebastian Dröge (slomo) 2006-11-02 20:27:59 UTC
Created attachment 75887 [details] [review]
mpeg2dec.diff
Comment 3 Sebastian Dröge (slomo) 2006-11-02 21:12:19 UTC
Created attachment 75889 [details] [review]
gstmpeg2dec-tests.diff

and add two other checks... one decoding a odd-sized video (which involves buffer copying and cropping) and one trying to decode some garbage.
Comment 4 Tim-Philipp Müller 2006-11-15 11:42:37 UTC
Cool, thanks for the patch, committed:

  2006-11-15  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Sebastian Dröge  <slomo@circular-chaos.org>

        * ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_init):
          Fix memleak when creating pads from static pad templates (#369627).

        * tests/check/Makefile.am:
        * tests/check/elements/.cvsignore:
        * tests/check/elements/mpeg2dec.c: (setup_mpeg2dec),
        (cleanup_mpeg2dec), (GST_START_TEST), (mpeg2dec_suite), (main):
          Add unit tests for mpeg2dec (#369627).