[FFmpeg-devel] [PATCH] fix av_dlog call with non-AVClass struct

Maksym Veremeyenko verem at m1stereo.tv
Mon Jan 16 15:25:43 CET 2012


*ff_combine_frame* call av_dlog with context argument of ParseContext 
type that have no AVClass first member. that cause SIGSEGV:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff606e49f in av_log (avcl=0x62c240, level=48,
     fmt=0x7ffff6f2bd68 "overread %d, state:%X next:%d index:%d 
o_index:%d\n") at libavutil/log.c:161
161	        level += *(int *) (((uint8_t *) avcl) + 
avc->log_level_offset_offset);
Missing separate debuginfos, use: debuginfo-install 
SDL-1.2.14-11.fc14.x86_64 alsa-lib-1.0.24-1.fc14.x86_64 
glibc-2.13-2.x86_64 libgcc-4.5.1-4.fc14.x86_64 
libogg-1.2.0-1.fc14.x86_64 libstdc++-4.5.1-4.fc14.x86_64 
libtheora-1.1.1-1.fc13.x86_64 libvorbis-1.3.1-2.fc14.x86_64 
speex-1.2-0.12.rc1.fc12.x86_64 zlib-1.2.5-2.fc14.x86_64
(gdb) bt
#0  0x00007ffff606e49f in av_log (avcl=0x62c240, level=48,
     fmt=0x7ffff6f2bd68 "overread %d, state:%X next:%d index:%d 
o_index:%d\n") at libavutil/log.c:161
#1  0x00007ffff6c9d247 in ff_combine_frame (pc=0x62c240, next=-100, 
buf=0x7fffffffda78, buf_size=0x7fffffffda74)
     at libavcodec/parser.c:223
#2  0x00007ffff6c8be58 in mpegvideo_parse (s=0x62c0e0, avctx=0x62b860, 
poutbuf=0x7fffffffddf0, poutbuf_size=0x7fffffffddf8,
     buf=0x692da0 "", buf_size=1024) at libavcodec/mpegvideo_parser.c:143
#3  0x00007ffff6c9ce9c in av_parser_parse2 (s=0x62c0e0, avctx=0x62b860, 
poutbuf=0x7fffffffddf0, poutbuf_size=0x7fffffffddf8,
     buf=<value optimized out>, buf_size=<value optimized out>, 
pts=-9223372036854775808, dts=-9223372036854775808,
     pos=463872) at libavcodec/parser.c:149
#4  0x00007ffff79096f3 in read_frame_internal (s=0x6253a0, 
pkt=0x7fffffffdde0) at libavformat/utils.c:1201
#5  0x00007ffff790af58 in avformat_find_stream_info (ic=0x6253a0, 
options=0x62bf20) at libavformat/utils.c:2489
#6  0x000000000040fcd6 in opt_input_file (o=<value optimized out>, 
opt=<value optimized out>,
     filename=0x7fffffffe77a 
"/home/studio/Videos/babkin_test_1080i25.m2v") at ffmpeg.c:3682
#7  0x0000000000415cef in parse_option (optctx=0x7fffffffe120, 
opt=0x7fffffffe778 "i",
     arg=0x7fffffffe77a "/home/studio/Videos/babkin_test_1080i25.m2v", 
options=<value optimized out>) at cmdutils.c:302
#8  0x0000000000415e89 in parse_options (optctx=0x7fffffffe120, argc=3, 
argv=0x7fffffffe4f8, options=0x61ba40,
     parse_arg_function=0x4113e0 <opt_output_file>) at cmdutils.c:335
#9  0x0000000000412af0 in main (argc=3, argv=0x7fffffffe4f8) at 
ffmpeg.c:5074

attached patch fix that.

-- 
________________________________________
Maksym Veremeyenko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-av_dlog-call-with-non-AVClass-struct.patch
Type: text/x-patch
Size: 1660 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120116/3c87777b/attachment.bin>


More information about the ffmpeg-devel mailing list