[Bug 645607] New: a problem of compiling 'ext/ffmpeg/gstffmpegcodecmap.c'

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Mar 23 13:05:50 PDT 2011

  GStreamer | gst-ffmpeg | 0.10.11

           Summary: a problem of compiling
    Classification: Desktop
           Product: GStreamer
           Version: 0.10.11
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-ffmpeg
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: brofkims at gmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
      GNOME target: ---
     GNOME version: ---

1. On 64-bit Ubuntu natty(10.04 beta) gcc-4.5.2-6ubuntu5 fails to compile
'ext/ffmpeg/gstffmpegcodecmap.c' in gst-ffmpeg- due to a
switch statement beinning at line 435.
BTW, gcc-4.4 compiles it well.
Error messages are following at the end of this report.

2. The switch statement is as follows:

    /* regardless of encode/decode, open up channels if applicable */
    /* Until decoders/encoders expose the maximum number of channels
     * they support, we whitelist them here. */
    switch (codec_id) {
      case CODEC_ID_AC3:
      case CODEC_ID_EAC3:
      case CODEC_ID_AAC:
      case CODEC_ID_DTS:
        maxchannels = 6;
      case CODEC_ID_WMAPRO:
      case CODEC_ID_TRUEHD:
        maxchannels = 8;

3. This code is compiled with gcc-4.4, but is not compiled with
gcc-4.5.2-6ubuntu5 due to internal compiler error.
It seems that this error begin to appear after I updated to gcc-4.5.2-6ubuntu5.

Anyhow, if I add 'maxchannels = 6' or 'maxchannels = 8' right below 'default:',
both gcc-4.4 and gcc-4.5.2-6ubuntu5 comples the whole code without error.

A patch is as follows:

--- a/ext/ffmpeg/gstffmpegcodecmap.c.orig       2011-03-24 02:29:40.000000000
+++ b/ext/ffmpeg/gstffmpegcodecmap.c    2011-03-24 02:08:12.000000000 +0900
@@ -444,6 +444,7 @@
         maxchannels = 8;
+       maxchannels = 6;

4.  I'm not convinced whether this is correct or not, but I am suspicious about
the switch statement after reading a reference page, ie.,

5. Error messages are as follows:

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -pthread
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 -I../../gst-libs
-I../../gst-libs -pthread -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-0.10
-I/usr/include/libxml2 -Wall -Wdeclaration-after-statement -Wvla
-Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
-Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security
-Wold-style-definition -Wcast-align -Winit-self -Wmissing-include-dirs
-Waddress -Waggregate-return -Wno-multichar -Wnested-externs -Werror
-DGST_DISABLE_DEPRECATED -g -O2 -g -O2 -Wno-error -c gstffmpegcodecmap.c  -fPIC
-DPIC -o .libs/libgstffmpeg_la-gstffmpegcodecmap.o
gstffmpegcodecmap.c: In function ‘gst_ffmpeg_get_palette’:
gstffmpegcodecmap.c:53:7: warning: ‘AVPaletteControl’ is deprecated (declared
at /usr/include/libavcodec/avcodec.h:2984)
gstffmpegcodecmap.c: In function ‘gst_ff_aud_caps_new’:
gstffmpegcodecmap.c:435:5: internal compiler error: in set_jump_prob, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make[4]: *** [libgstffmpeg_la-gstffmpegcodecmap.lo] error 1
make[4]: Leaving directory
make[3]: *** [all-recursive] error 1
make[3]: Leaving directory
make[2]: *** [all-recursive] error 1
make[2]: Leaving directory
make[1]: *** [all] error 2
make[1]: Leaving directory
make: *** [debian/stamp-makefile-build] error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

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