tags 647824 upstream stop On So, Nov 06, 2011 at 17:53:30 (CET), Harald Dunkel wrote:
> Package: libav > Version: 4:0.7.2-1 > > If I build the current xbmc snapshot, then it dies at runtime when > creating thumbnails for wmv files. See http://trac.xbmc.org/ticket/11789 > for more details > > http://article.gmane.org/gmane.comp.video.ffmpeg.devel/134444 > > provides a workaround. Do you think this could be included in the > libav and libav-extra packages? > That patch does not apply to Debian's libav package. In fact, it seems that this bug is still present in the master branch. I was able to reproduce the segmentation fault using the following command in libav *master* (inspired by https://ffmpeg.org/trac/ffmpeg/ticket/397): ./ffmpeg -v 9 -loglevel 99 -i /srv/scratch/fate-suite/amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv -sws_flags fast_bilinear -vf "scale=640:480" -vframes 1 -vcodec png output.png Unforutnately, this (adapted) patch does not seem to fix the segmentation fault: diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index 5e7df5c..51ea303 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -1657,6 +1657,11 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst, DECLARE_ALIGNED(8, uint64_t, ebxsave); #endif + // HACK: gcc 4.6 no longer decrements esp, + // use this to make it reserve space for the call + // return address + void *dummy; + __asm__ volatile( #if defined(PIC) "mov %%"REG_b", %5 \n\t" With this patch applied, the backtrace looks like this: (gdb) bt #0 0x000000000132ad00 in ?? () #1 0x00000000009d79fd in hyscale_fast_MMX2 (c=0x1329040, dst=0x0, dstWidth=20100256, src=0x135a6c0 "", srcW=160, xInc=16404) at libswscale/x86/swscale_template.c:1665 #2 0x00000000009c8fa9 in hyscale (isAlpha=0, pal=0x133d5a0, formatConvBuffer=0x132eb40 "\310\064\"\367\377\177", hLumFilterSize=0, hLumFilterPos=0x132ece0, hLumFilter=0x132b4a0, xInc=16404, srcW=160, src=<optimized out>, dstWidth=640, dst=0x1329040, c=0x133d520) at libswscale/swscale.c:1990 #3 swScale (c=0x133d520, src=<optimized out>, srcStride=<optimized out>, srcSliceY=0, srcSliceH=120, dst=0x7fffffffc9a0, dstStride=0x7fffffffc9d0) at libswscale/swscale.c:2429 #4 0x00000000009b11bf in sws_scale (c=0x133d520, srcSlice=<optimized out>, srcStride=<optimized out>, srcSliceY=0, srcSliceH=<optimized out>, dst=<optimized out>, dstStride=0x1329608) at libswscale/swscale_unscaled.c:913 #5 0x000000000045094c in draw_slice (link=0x132a640, y=<optimized out>, h=<optimized out>, slice_dir=1) at libavfilter/vf_scale.c:279 #6 0x0000000000445b74 in avfilter_draw_slice (link=0x132a640, y=0, h=120, slice_dir=1) at libavfilter/avfilter.c:484 #7 0x0000000000454069 in request_frame (link=0x132a640) at libavfilter/vsrc_buffer.c:141 #8 0x0000000000444c7b in avfilter_request_frame (link=<optimized out>) at libavfilter/avfilter.c:373 Ronald, do you have any clue what's going on/wrong here? Cheers, Reinhard. -- Gruesse/greetings, Reinhard Tartler, KeyID 945348A4 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
