[FFmpeg-devel] Modifying asf-enc.c {Getting few errors}

Irfan Shaikh irfanshaikh
Mon Sep 29 13:01:00 CEST 2008

Hi all,

      I am modifying asf-enc.c so as to support muxing of H264, MPEG4 and Mjpeg video & G726 audio. I have done following chages to code.
My undersatnding is if i use standard MACROs from avcodec.h. I can serve my purpose to get an o/p ASF stream.

     I have mentioned //Modified where i have change. I hav mentioned the errors i get at the end ....

static const AVCodecTag codec_asf_bmp_tags[] = {
    { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
    { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
    { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
    { CODEC_ID_MJPEG, MTAG('M', 'J', 'P', 'G') },          //Modified
    { CODEC_ID_H264, MKTAG('H', '2', '6', '4') },          //Modified 
    { CODEC_ID_NONE, 0 },

At the end of the code

AVOutputFormat asf_stream_muxer = {
    CODEC_ID_ADPCM_G726,                  //Modified  
    CODEC_ID_MPEG4,                       //Modified
    CODEC_ID_H264,                        //Modified   
    CODEC_ID_MJPEG,                       //Modified
    .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},

gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/GStreamer/gst-ffmpeg-0.10.5/gst-libs/ext/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm -std=c99 -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -O3 -fno-math-errno        -c -o libavformat/asf-enc.o libavformat/asf-enc.c
libavformat/asf-enc.c:195: warning: implicit declaration of function ?MTAG?
libavformat/asf-enc.c:195: error: initializer element is not constant
libavformat/asf-enc.c:195: error: (near initialization for ?codec_asf_bmp_tags[4].tag?)
libavformat/asf-enc.c: In function ?put_chunk?:
libavformat/asf-enc.c:249: warning: ISO C90 forbids mixed declarations and code
libavformat/asf-enc.c: At top level:
libavformat/asf-enc.c:852: warning: initialization makes pointer from integer without a cast
libavformat/asf-enc.c:853: warning: initialization makes pointer from integer without a cast
libavformat/asf-enc.c:854: warning: initialization makes pointer from integer without a cast
libavformat/asf-enc.c:856: warning: initialization from incompatible pointer type
libavformat/asf-enc.c:857: warning: initialization from incompatible pointer type
libavformat/asf-enc.c:858: warning: initialization from incompatible pointer type
make[5]: *** [libavformat/asf-enc.o] Error 1
make[5]: Leaving directory `/home/GStreamer/gst-ffmpeg-0.10.5/gst-libs/ext/ffmpeg'
make[4]: *** [all-local] Error 2
make[4]: Leaving directory `/home/GStreamer/gst-ffmpeg-0.10.5/gst-libs/ext'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/GStreamer/gst-ffmpeg-0.10.5/gst-libs/ext'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/GStreamer/gst-ffmpeg-0.10.5/gst-libs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/GStreamer/gst-ffmpeg-0.10.5'
make: *** [all] Error 2

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

More information about the ffmpeg-devel mailing list