[Ffmpeg-devel] bitstream.h ALT_BITSTREAM_WRITER

Oded Shimon ods15
Fri Sep 22 14:06:45 CEST 2006


Turns out, for my vorbis encoder is need ALT_BITSTREAM_WRITER (which i 
assumes means it goes in the opposite direction of bits inside a byte) I 
tried enabling this, and first thing I was hit with is this:

bitstream.h:326
#ifdef ALT_BITSTREAM_WRITER
        FIXME may need some cleaning of the buffer
        s->index += n<<3;
#else

Commented out that line. Got a warning on implicit decleration of 
align_put_bits() in bitstream.h:117 .

Compilation worked, but ffmpeg froze during encoding.
Ran in gdb, got this backtrace by interuppting during freeze:

#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7ea659e in pthread_setcanceltype () from /lib/libc.so.6
#2  0x080ba0ed in av_realloc_static (ptr=0x0, size=0) at utils.c:91
#3  0x08380bbb in build_table (vlc=0x8432540, table_nb_bits=7, nb_codes=512, bits=0xbf954890, bits_wrap=1, bits_size=1, codes=0xbf954490, codes_wrap=2,
    codes_size=2, code_prefix=0, n_prefix=0, flags=1) at bitstream.c:79
#4  0x083810be in init_vlc (vlc=0x8432540, nb_bits=2, nb_codes=-4, bits=0xfffffffc, bits_wrap=-4, bits_size=-4, codes=0xfffffffc, codes_wrap=-4,
    codes_size=-4, use_static=-4) at bitstream.c:237
#5  0x081ece1e in decode_init (avctx=0x8499100) at mpegaudiodec.c:391
#6  0x080b96e7 in avcodec_open (avctx=0x8499100, codec=0x8420d60) at utils.c:858
#7  0x08057e51 in av_encode (output_files=0x84273e0, nb_output_files=1, input_files=0x84272e0, nb_input_files=1, stream_maps=0x8427440, nb_stream_maps=0)
    at ffmpeg.c:1791
#8  0x08056345 in main (argc=4000, argv=0xfffffffc) at ffmpeg.c:4248


... which seems completely irrelavent to the vorbis encoder... There's 
probably some kind of malloc buffer overflow in bitstram.h ..
Input file is MP3.

Is there some other kind of bitstream writer in ffmpeg I can use?...

- ods15




More information about the ffmpeg-devel mailing list