Discussion:
[MPlayer-users] MPEG/DVD crashing when taking screenshot
Josh
2015-09-11 17:36:00 UTC
Permalink
Another screenshot issue. Uploaded to /incoming as
mpeg_crash_screenshot.mpg & .txt. Seems to be just MPEG/DVD. I made a
debug but backtrace is useless:

[VD_FFMPEG] DRI failure.
*** [screenshot] Exporting mp_image_t, 1920x1080x12bpp YUV planar,
3110400 bytes
*** [vo] Exporting mp_image_t, 1920x1080x12bpp YUV planar, 3110400 bytes
V: 2.2 43/ 43 26% 0% 0.0% 0 0
sending VFCTRL_SCREENSHOT!

Program received signal SIGSEGV, Segmentation fault.
0x0000000000bf575d in ?? ()
(gdb) bt
#0 0x0000000000bf575d in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

Last version that works:
r37448 with FFmpeg:
"N-74447-g767d780"
"767d780ec001167b2fd8f6cfe4ef78a3a8b1e34c"
"Sun Aug 16 02:16:47 2015 +0200"
"doc/examples: rename avio_list_dir -> avio_dir_cmd"



First version to crash:
r37451 with FFmpeg:
"N-74594-gb4d68e7"
"b4d68e7cdb3be029c669b15ac0da158454fb910d"
"Sun Aug 23 04:16:02 2015 +0200"
"avformat: Remove use of AVFrac and AVStream->pts"

Still trying to narrow down since I didn't compile anything between
those dates (would have made it a lot easier).
Josh
2015-09-12 07:17:22 UTC
Permalink
Post by Josh
Another screenshot issue. Uploaded to /incoming as
mpeg_crash_screenshot.mpg & .txt. Seems to be just MPEG/DVD. I made a
[VD_FFMPEG] DRI failure.
*** [screenshot] Exporting mp_image_t, 1920x1080x12bpp YUV planar,
3110400 bytes
*** [vo] Exporting mp_image_t, 1920x1080x12bpp YUV planar, 3110400 bytes
V: 2.2 43/ 43 26% 0% 0.0% 0 0
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000000000bf575d in ?? ()
(gdb) bt
#0 0x0000000000bf575d in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
"N-74447-g767d780"
"767d780ec001167b2fd8f6cfe4ef78a3a8b1e34c"
"Sun Aug 16 02:16:47 2015 +0200"
"doc/examples: rename avio_list_dir -> avio_dir_cmd"
"N-74594-gb4d68e7"
"b4d68e7cdb3be029c669b15ac0da158454fb910d"
"Sun Aug 23 04:16:02 2015 +0200"
"avformat: Remove use of AVFrac and AVStream->pts"
Still trying to narrow down since I didn't compile anything between
those dates (would have made it a lot easier).
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Seems this was it:
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=737aa902f069ed218fd2d13c59015391facf73c8
and affects only MPEG/DVD for some weird reason. It seems -noslices can
fix some MPEG/DVDs but some just give 'signal 11 in module:
filter_video' (instead of decode_video) with the same unable to do a
backtrace.
Josh
2015-09-13 04:26:42 UTC
Permalink
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
moderation for being too big:

http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Roberto Togni
2015-09-14 18:59:46 UTC
Permalink
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.

...
sending VFCTRL_SCREENSHOT!

Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
(s=***@entry=0x5555570f6e40, y=<optimized out>, h=<optimized out>) at
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
(s=***@entry=0x5555570f6e40, mb_y=***@entry=1,
buf=***@entry=0x7fffffffcdd8, buf_size=***@entry=2077) at
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
(avctx=***@entry=0x5555570f69a0,
picture=***@entry=0x5555570f6760,
got_output=***@entry=0x7fffffffcf60, buf=0x555556f088c0 "",
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811


You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.


Ciao,
Roberto
Roberto Togni
2015-09-14 21:40:26 UTC
Permalink
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850

I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null


Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
ctx=***@entry=0x1b455e0, frame=***@entry=0x1cca620,
flags=***@entry=4)
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
frame=***@entry=0x1cca620, flags=***@entry=4)
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)


Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).


The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.


Ciao,
Roberto
Josh
2015-09-15 05:15:07 UTC
Permalink
Post by Roberto Togni
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I have one video in particular where it still crashes with -noslices
(/incoming/mpeg_ss_crash_beetlejuice.mpg). I am also I'm having a big
WTF moment because I tried that same video & patched mplayer executable
through Dr. Memory & SMPlayer and it crashed regardless of
slices/noslices; whereas through gdb and the normal command-line your
patch stopped the crash when using slices (although with a wrong
picture). Confused yet? Same junk from gdb. Except for SMPlayer I am
only issuing these commands to Dr Memory, gdb and command line:

-v -vo direct3d -vf screenshot

D:/Programs/SMPlayer/mplayer/mplayer.exe -noquiet -slave -identify -v
-nofs -lavdopts threads=4 -sub-fuzziness 1 -vo direct3d -ao dsound
-priority abovenormal -framedrop -dr -double -nomouseinput -nokeepaspect
-wid 7864784 -monitorpixelaspect 1 -subfont-osd-scale 3 -ass
-embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -noflip-hebrew
-ass-styles D:/Programs/SMPlayer/styles.ass -subcp ISO-8859-1 -vid 0
-subpos 100 -volume 42 -cache 9999 -osdlevel 0 -vf-add screenshot
-slices -channels 2 -af-add volnorm=1 -af-add scaletempo -af-add
equalizer=0:0:0:0:0:0:0:0:0:0 -nofontconfig -subfont-osd-scale 1
C:/Users/Joshua/Desktop/mpeg_crash_ss_beetlejuice.mpg

MPlayer SVN-r37524-4.9.3 (C) 2000-2015 MPlayer Team
CPU vendor name: GenuineIntel max cpuid level: 13
CPU: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz (Family: 6, Model: 42,
Stepping: 7)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
Testing OS support for SSE... yes.
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSE3: 1
SSSE3: 1 SSE4: 1 SSE4.2: 1 AVX: 1
Compiled with runtime CPU detection.
Setting PATH to D:\Programs\SMPlayer\mplayer\codecs
Setting process priority: abovenormal

get_path('codecs.conf') ->
'D:/Programs/SMPlayer/mplayer/mplayer/codecs.conf'
Reading optional codecs config file
D:/Programs/SMPlayer/mplayer/mplayer/codecs.conf: No such file or directory
Reading optional codecs config file /usr/local/etc/mplayer/codecs.conf:
No such file or directory
Using built-in default codecs.conf.
init_freetype
get_path('font/font.desc') ->
'D:/Programs/SMPlayer/mplayer/mplayer/font/font.desc'
font: can't open file: D:/Programs/SMPlayer/mplayer/mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> 'D:/Programs/SMPlayer/mplayer/mplayer/fonts'
Configuration: --enable-static --enable-runtime-cpudetection
--enable-menu --disable-inet6 --disable-liba52
--disable-libmpeg2-internal --disable-tv --disable-vidix
--disable-faac-lavc --extra-cflags=-I/sources/live555 --disable-mencoder
--enable-debug=3
CommandLine: '-noquiet' '-slave' '-identify' '-v' '-nofs' '-lavdopts'
'threads=4' '-sub-fuzziness' '1' '-vo' 'direct3d' '-ao' 'dsound'
'-priority' 'abovenormal' '-framedrop' '-dr' '-double' '-nomouseinput'
'-nokeepaspect' '-wid' '7864784' '-monitorpixelaspect' '1'
'-subfont-osd-scale' '3' '-ass' '-embeddedfonts' '-ass-line-spacing' '0'
'-ass-font-scale' '1' '-noflip-hebrew' '-ass-styles'
'D:/Programs/SMPlayer/styles.ass' '-subcp' 'ISO-8859-1' '-vid' '0'
'-subpos' '100' '-volume' '42' '-cache' '9999' '-osdlevel' '0' '-vf-add'
'screenshot' '-slices' '-channels' '2' '-af-add' 'volnorm=1' '-af-add'
'scaletempo' '-af-add' 'equalizer=0:0:0:0:0:0:0:0:0:0' '-nofontconfig'
'-subfont-osd-scale' '1'
'C:/Users/Joshua/Desktop/mpeg_crash_ss_beetlejuice.mpg'
Using Windows native timing
get_path('input.conf') -> 'D:/Programs/SMPlayer/mplayer/mplayer/input.conf'
Parsing input config file D:/Programs/SMPlayer/mplayer/mplayer/input.conf
Input config file D:/Programs/SMPlayer/mplayer/mplayer/input.conf
parsed: 92 binds
get_path('mpeg_crash_ss_beetlejuice.mpg.conf') ->
'D:/Programs/SMPlayer/mplayer/mplayer/mpeg_crash_ss_beetlejuice.mpg.conf'

Playing C:/Users/Joshua/Desktop/mpeg_crash_ss_beetlejuice.mpg.
get_path('sub/') -> 'D:/Programs/SMPlayer/mplayer/mplayer/sub/'
WINSOCK2 init: 0
WINSOCK2 init: 0
[file] File size is 104857600 bytes
STREAM: [file] C:/Users/Joshua/Desktop/mpeg_crash_ss_beetlejuice.mpg
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0 pre:2047795 eof:0

Cache fill: 0.00% (0 bytes)

libavformat version 57.0.100 (internal)
Configuration: --enable-gpl --enable-postproc
LAVF_check: MPEG-PS (MPEG-2 Program Stream)
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
SUB: opened iconv descriptor.
SUB: closed iconv descriptor.
Searching demuxer type for filename
C:/Users/Joshua/Desktop/mpeg_crash_ss_beetlejuice.mpg ext: .mpg
Checking for Nullsoft Streaming Video
Checking for MOV
Checking for VIVO
header block 1 size: 0
AVS: avs_check_file - attempting to open file
C:/Users/Joshua/Desktop/mpeg_crash_ss_beetlejuice.mpg
AVS: File is too big, aborting...
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 70681, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=0 size=1140851704
LMLM4 Stream Format not found
system stream synced at 0xD (13)!
==> Found video stream: 0
ID_VIDEO_ID=0
==> Found audio stream: 0
ID_AUDIO_ID=0
MPEG-PS file format detected.
Searching for sequence header... OK!
VIDEO: MPEG2 720x480 (aspect 2) 29.970 fps 8500.0 kbps (1062.5 kbyte/s)
[V] filefmt:2 fourcc:0x10000002 size:720x480 fps:29.970 ftime:=0.0334
Load subtitles in C:/Users/Joshua/Desktop/
get_path('sub/') -> 'D:/Programs/SMPlayer/mplayer/mplayer/sub/'
ID_FILENAME=C:/Users/Joshua/Desktop/mpeg_crash_ss_beetlejuice.mpg
ID_DEMUXER=mpegps
ID_VIDEO_FORMAT=0x10000002
ID_VIDEO_BITRATE=8500000
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_START_TIME=0.10
ID_LENGTH=105.25
ID_SEEKABLE=1
ID_CHAPTERS=0
<vo_direct3d>Setting backbuffer dimensions to (1366x768).
<vo_direct3d>device_caps_power2_only 0, device_caps_square_only 0
<vo_direct3d>device_texture_sys 0
<vo_direct3d>max_texture_width 8192, max_texture_height 8192
vo: win32: running at 1366x768 with depth 32
Opening video filter: [ass auto=1]
<vo_direct3d>Accepted image format: Planar YV12
[vo] query(Planar YV12) -> 3
<vo_direct3d>Accepted image format: Planar YV12
[ass] auto-open
Opening video filter: [screenshot]
[ass] Raster: FreeType 2.6.0
[ass] Shaper: FriBidi 0.19.7 (SIMPLE)
[ass] Initialized
get_path('fonts') -> 'D:/Programs/SMPlayer/mplayer/mplayer/fonts'
get_path('subfont.ttf') ->
'D:/Programs/SMPlayer/mplayer/mplayer/subfont.ttf'
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 57.1.100 (internal)
Configuration: --enable-gpl --enable-postproc
INFO: libavcodec init OK!
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
ID_VIDEO_CODEC=ffmpeg2
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
dec_audio: Allocating 8192 + 131072 = 139264 bytes for output buffer.
MPEG 1.0 layer II, 128 kbit/s, 48000 Hz stereo
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I,
II, III)
==========================================================================
Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter volnorm
[libaf] Adding filter scaletempo
[libaf] Adding filter equalizer
[scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
[libaf] Adding filter format
[format] Changing sample format from little-endian 16-bit signed int to
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian
32-bit float conversion
[scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
[format] Changing sample format from little-endian 16-bit signed int to
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian
32-bit float conversion
Trying preferred audio driver 'dsound', options '[none]'
ao_dsound: Output Devices:
0 Primary Sound Driver <--
1 Speakers / HP (IDT High Definition Audio CODEC)
ao_dsound: DirectSound initialized
ao_dsound: format floatle not supported defaulting to Signed 16-bit
Little-Endian
ao_dsound: Samplerate:48000Hz Channels:2 Format:s16le
ao_dsound: Buffersize:192000 bytes (1000 msec)
ao_dsound: primary buffer created
ao_dsound: secondary (stream)buffer created
AO: [dsound] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: Windows DirectSound audio output
AO: Author: Gabor Szecsi <***@miki.hu>
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
[format] Changing sample format from little-endian 16-bit signed int to
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian
32-bit float conversion
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit float to
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit
signed int conversion
[scaletempo] 1.000 speed * 1.000 scale_nominal = 1.000
[format] Changing sample format from little-endian 16-bit signed int to
little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian
32-bit float conversion
[format] Changing sample format from little-endian 32-bit float to
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit
signed int conversion
ID_AUDIO_CODEC=mpg123
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 266245
[libaf] Reallocating memory in module format, old len = 0, new len = 133129
Increasing filtered audio buffer size from 0 to 133120
ds_fill_buffer: EOF reached (stream: audio)
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
Trying filter chain: screenshot ass vo
<vo_direct3d>Accepted image format: Planar YV12
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (720x480->720x480,flags=0,'MPlayer',0x32315659)
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 5 -> 4
[swscaler @ 01634920]bicubic scaler, from yuv420p to rgb24 using MMXEXT
[swscaler @ 01634920]720x480 -> 720x480
[swscaler @ 01634920]lum srcW=720 srcH=480 dstW=720 dstH=480 xInc=65536
yInc=65536
[swscaler @ 01634920]chr srcW=360 srcH=240 dstW=360 dstH=480 xInc=65536
yInc=32768
[swscaler @ 01634920]using unscaled yuv420p -> rgb24 special converter
<vo_direct3d>Accepted image format: Planar YV12
REQ: flags=0x2437 req=0x0
<vo_direct3d>Accepted image format: Planar YV12
REQ: flags=0x437 req=0x0
VO: [direct3d] 720x480 => 720x480 Planar YV12
VO: Description: Direct3D 9 Renderer
VO: Author: Georgi Petrov (gogothebee) <***@gmail.com>
<vo_direct3d>Accepted image format: Planar YV12
<vo_direct3d>destroy_d3d_surfaces called.
<vo_direct3d>configure_d3d called.
<vo_direct3d>destroy_d3d_surfaces called.
<vo_direct3d>destroy_d3d_surfaces called.
<vo_direct3d>New backbuffer (1366x768), VO (720x480)
<vo_direct3d>create_d3d_surfaces called.
<vo_direct3d>OSD texture size (720x480), requested (720x480).
<vo_direct3d>Fullscreen movie rectangle: t: 0, l: 0, r: 720, b:480
*** [ass] Allocating mp_image_t, 768x480x12bpp YUV planar, 552960 bytes
*** [screenshot] Direct Rendering mp_image_t, 768x480x12bpp YUV planar,
552960 bytes
*** [ass] Allocating mp_image_t, 768x480x12bpp YUV planar, 552960 bytes
*** [screenshot] Direct Rendering mp_image_t, 768x480x12bpp YUV planar,
552960 bytes
[ffmpeg] aspect_ratio: 1.333333
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
Trying filter chain: screenshot ass vo
<vo_direct3d>Accepted image format: Planar YV12
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=1.3333
VO Config (720x480->720x540,flags=0,'MPlayer',0x32315659)
<vo_direct3d>Accepted image format: Planar YV12
REQ: flags=0x2437 req=0x0
<vo_direct3d>Accepted image format: Planar YV12
REQ: flags=0x437 req=0x0
VO: [direct3d] 720x480 => 720x540 Planar YV12
VO: Description: Direct3D 9 Renderer
VO: Author: Georgi Petrov (gogothebee) <***@gmail.com>
<vo_direct3d>Accepted image format: Planar YV12
<vo_direct3d>destroy_d3d_surfaces called.
<vo_direct3d>configure_d3d called.
<vo_direct3d>destroy_d3d_surfaces called.
<vo_direct3d>destroy_d3d_surfaces called.
<vo_direct3d>New backbuffer (1366x768), VO (720x540)
<vo_direct3d>create_d3d_surfaces called.
<vo_direct3d>OSD texture size (720x540), requested (720x544).
<vo_direct3d>Fullscreen movie rectangle: t: 0, l: 0, r: 720, b:540
<vo_direct3d>Direct Rendering request. Not implemented yet.
*** [vo] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400 bytes
<vo_direct3d>resize_d3d called.
<vo_direct3d>create_d3d_surfaces called.
<vo_direct3d>OSD texture size (533x400), requested (544x400).
<vo_direct3d>Fullscreen movie rectangle: t: 0, l: 0, r: 533, b:400

ds_fill_buffer: EOF reached (stream: audio)
*** [ass] Allocating mp_image_t, 768x480x12bpp YUV planar, 552960 bytes
*** [screenshot] Direct Rendering mp_image_t, 768x480x12bpp YUV planar,
552960 bytes
get_path('subfont.ttf') ->
'D:/Programs/SMPlayer/mplayer/mplayer/subfont.ttf'
Unicode font: 2993 glyphs.
get_path('subfont.ttf') ->
'D:/Programs/SMPlayer/mplayer/mplayer/subfont.ttf'
Unicode font: 2993 glyphs.

ds_fill_buffer: EOF reached (stream: audio)

ds_fill_buffer: EOF reached (stream: audio)
[VD_FFMPEG] DRI failure.
*** [screenshot] Exporting mp_image_t, 720x480x12bpp YUV planar, 518400
bytes
*** [ass] Exporting mp_image_t, 720x480x12bpp YUV planar, 518400 bytes

ds_fill_buffer: EOF reached (stream: audio)

ds_fill_buffer: EOF reached (stream: audio)

[format] Changing sample format from little-endian 32-bit float to
little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit
signed int conversion

sending VFCTRL_SCREENSHOT!


MPlayer interrupted by signal 11 in module: filter_video
ID_SIGNAL=11
- MPlayer crashed by bad usage of CPU/FPU/RAM.
Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
disassembly. Details in
DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We
can't and
won't help unless you provide this information when reporting a
possible bug.
Josh
2015-09-21 05:05:59 UTC
Permalink
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.

There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Roberto Togni
2015-09-21 20:42:28 UTC
Permalink
On Mon, 21 Sep 2015 01:05:59 -0400
Post by Josh
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.
There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Fix for #4850 did not stop the crash for me too.

What I found out is that if I force FFmpeg to use the old scaler
filters, everything works fine.

I was still unable to find out if something changed in the way you need
to use swscaler (I don't think so), if there is a bug in the new
swscaler, or if we always used it in the wrong way and we were just
lucky up to now.

I'm not much worried about vf_screenshot, but about all other uses of
the scaler code in the mail player.

If you want to test it, just comment out #define NEW_FILTER at the end
of ffmpeg/libswscale/swscale_internal.h and recompile everything.

This is a possible workaround for people using the internal ffmpeg copy
of MPlayer, it will not help if you use a system-wide install of ffmpeg.


Ciao,
Roberto
Josh
2015-09-22 04:38:28 UTC
Permalink
Post by Roberto Togni
On Mon, 21 Sep 2015 01:05:59 -0400
Post by Josh
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.
There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Fix for #4850 did not stop the crash for me too.
What I found out is that if I force FFmpeg to use the old scaler
filters, everything works fine.
I was still unable to find out if something changed in the way you need
to use swscaler (I don't think so), if there is a bug in the new
swscaler, or if we always used it in the wrong way and we were just
lucky up to now.
I'm not much worried about vf_screenshot, but about all other uses of
the scaler code in the mail player.
If you want to test it, just comment out #define NEW_FILTER at the end
of ffmpeg/libswscale/swscale_internal.h and recompile everything.
This is a possible workaround for people using the internal ffmpeg copy
of MPlayer, it will not help if you use a system-wide install of ffmpeg.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
As of current FFmpeg master with disabling the new filter everything
works fine so far.
Roberto Togni
2015-09-23 22:04:37 UTC
Permalink
On Tue, 22 Sep 2015 00:38:28 -0400
Post by Josh
Post by Roberto Togni
On Mon, 21 Sep 2015 01:05:59 -0400
Post by Josh
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.
There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Fix for #4850 did not stop the crash for me too.
What I found out is that if I force FFmpeg to use the old scaler
filters, everything works fine.
I was still unable to find out if something changed in the way you need
to use swscaler (I don't think so), if there is a bug in the new
swscaler, or if we always used it in the wrong way and we were just
lucky up to now.
I'm not much worried about vf_screenshot, but about all other uses of
the scaler code in the mail player.
If you want to test it, just comment out #define NEW_FILTER at the end
of ffmpeg/libswscale/swscale_internal.h and recompile everything.
This is a possible workaround for people using the internal ffmpeg copy
of MPlayer, it will not help if you use a system-wide install of ffmpeg.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
As of current FFmpeg master with disabling the new filter everything
works fine so far.
I found a way to produce a simple test case that fails in the exact way
as MPlayer.
See ffmpeg ticket https://trac.ffmpeg.org/ticket/4877

Ciao,
Roberto
Roberto Togni
2015-09-25 21:23:45 UTC
Permalink
On Thu, 24 Sep 2015 00:04:37 +0200
Post by Roberto Togni
On Tue, 22 Sep 2015 00:38:28 -0400
Post by Josh
Post by Roberto Togni
On Mon, 21 Sep 2015 01:05:59 -0400
Post by Josh
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.
There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Fix for #4850 did not stop the crash for me too.
What I found out is that if I force FFmpeg to use the old scaler
filters, everything works fine.
I was still unable to find out if something changed in the way you need
to use swscaler (I don't think so), if there is a bug in the new
swscaler, or if we always used it in the wrong way and we were just
lucky up to now.
I'm not much worried about vf_screenshot, but about all other uses of
the scaler code in the mail player.
If you want to test it, just comment out #define NEW_FILTER at the end
of ffmpeg/libswscale/swscale_internal.h and recompile everything.
This is a possible workaround for people using the internal ffmpeg copy
of MPlayer, it will not help if you use a system-wide install of ffmpeg.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
As of current FFmpeg master with disabling the new filter everything
works fine so far.
I found a way to produce a simple test case that fails in the exact way
as MPlayer.
See ffmpeg ticket https://trac.ffmpeg.org/ticket/4877
Crash is fixed with slices with latest ffmpeg, but image is wrong.
See https://trac.ffmpeg.org/ticket/4881

The second sample still crashes with -noslices, but up to now I was
unable to create a simple test case to report it.

Ciao,
Roberto
Roberto Togni
2015-10-13 20:00:02 UTC
Permalink
On Fri, 25 Sep 2015 23:23:45 +0200
Post by Roberto Togni
On Thu, 24 Sep 2015 00:04:37 +0200
Post by Roberto Togni
On Tue, 22 Sep 2015 00:38:28 -0400
Post by Josh
Post by Roberto Togni
On Mon, 21 Sep 2015 01:05:59 -0400
Post by Josh
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.
There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Fix for #4850 did not stop the crash for me too.
What I found out is that if I force FFmpeg to use the old scaler
filters, everything works fine.
I was still unable to find out if something changed in the way you need
to use swscaler (I don't think so), if there is a bug in the new
swscaler, or if we always used it in the wrong way and we were just
lucky up to now.
I'm not much worried about vf_screenshot, but about all other uses of
the scaler code in the mail player.
If you want to test it, just comment out #define NEW_FILTER at the end
of ffmpeg/libswscale/swscale_internal.h and recompile everything.
This is a possible workaround for people using the internal ffmpeg copy
of MPlayer, it will not help if you use a system-wide install of ffmpeg.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
As of current FFmpeg master with disabling the new filter everything
works fine so far.
I found a way to produce a simple test case that fails in the exact way
as MPlayer.
See ffmpeg ticket https://trac.ffmpeg.org/ticket/4877
Crash is fixed with slices with latest ffmpeg, but image is wrong.
See https://trac.ffmpeg.org/ticket/4881
The second sample still crashes with -noslices, but up to now I was
unable to create a simple test case to report it.
Fixed in FFmpeg git.

The only problem remaining is the second sample with -noslices, it
still crashes for me on Linux X86_64. I'll check if I can debug it
in MPlayer, since I can't create a stand-alone testcase.


Ciao,
Roberto
Josh
2015-10-20 08:36:37 UTC
Permalink
Post by Roberto Togni
On Fri, 25 Sep 2015 23:23:45 +0200
Post by Roberto Togni
On Thu, 24 Sep 2015 00:04:37 +0200
Post by Roberto Togni
On Tue, 22 Sep 2015 00:38:28 -0400
Post by Josh
Post by Roberto Togni
On Mon, 21 Sep 2015 01:05:59 -0400
Post by Josh
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.
There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Fix for #4850 did not stop the crash for me too.
What I found out is that if I force FFmpeg to use the old scaler
filters, everything works fine.
I was still unable to find out if something changed in the way you need
to use swscaler (I don't think so), if there is a bug in the new
swscaler, or if we always used it in the wrong way and we were just
lucky up to now.
I'm not much worried about vf_screenshot, but about all other uses of
the scaler code in the mail player.
If you want to test it, just comment out #define NEW_FILTER at the end
of ffmpeg/libswscale/swscale_internal.h and recompile everything.
This is a possible workaround for people using the internal ffmpeg copy
of MPlayer, it will not help if you use a system-wide install of ffmpeg.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
As of current FFmpeg master with disabling the new filter everything
works fine so far.
I found a way to produce a simple test case that fails in the exact way
as MPlayer.
See ffmpeg ticket https://trac.ffmpeg.org/ticket/4877
Crash is fixed with slices with latest ffmpeg, but image is wrong.
See https://trac.ffmpeg.org/ticket/4881
The second sample still crashes with -noslices, but up to now I was
unable to create a simple test case to report it.
Fixed in FFmpeg git.
The only problem remaining is the second sample with -noslices, it
still crashes for me on Linux X86_64. I'll check if I can debug it
in MPlayer, since I can't create a stand-alone testcase.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Much appreciation on fixing this issue so far. Thanks Roberto.
Roberto Togni
2016-02-14 20:37:08 UTC
Permalink
On Tue, 20 Oct 2015 04:36:37 -0400
Post by Josh
Post by Roberto Togni
On Fri, 25 Sep 2015 23:23:45 +0200
Post by Roberto Togni
On Thu, 24 Sep 2015 00:04:37 +0200
Post by Roberto Togni
On Tue, 22 Sep 2015 00:38:28 -0400
Post by Josh
Post by Roberto Togni
On Mon, 21 Sep 2015 01:05:59 -0400
Post by Josh
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.
There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Fix for #4850 did not stop the crash for me too.
What I found out is that if I force FFmpeg to use the old scaler
filters, everything works fine.
I was still unable to find out if something changed in the way you need
to use swscaler (I don't think so), if there is a bug in the new
swscaler, or if we always used it in the wrong way and we were just
lucky up to now.
I'm not much worried about vf_screenshot, but about all other uses of
the scaler code in the mail player.
If you want to test it, just comment out #define NEW_FILTER at the end
of ffmpeg/libswscale/swscale_internal.h and recompile everything.
This is a possible workaround for people using the internal ffmpeg copy
of MPlayer, it will not help if you use a system-wide install of ffmpeg.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
As of current FFmpeg master with disabling the new filter everything
works fine so far.
I found a way to produce a simple test case that fails in the exact way
as MPlayer.
See ffmpeg ticket https://trac.ffmpeg.org/ticket/4877
Crash is fixed with slices with latest ffmpeg, but image is wrong.
See https://trac.ffmpeg.org/ticket/4881
The second sample still crashes with -noslices, but up to now I was
unable to create a simple test case to report it.
Fixed in FFmpeg git.
The only problem remaining is the second sample with -noslices, it
still crashes for me on Linux X86_64. I'll check if I can debug it
in MPlayer, since I can't create a stand-alone testcase.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Much appreciation on fixing this issue so far. Thanks Roberto.
Finally fixed.
It was a MPlayer bug in the use of swscaler, not related to the new
sws filter code. I have no idea why it was not crashing also with the
old code.

Ciao,
Roberto
Josh
2016-02-14 22:25:18 UTC
Permalink
Post by Roberto Togni
On Tue, 20 Oct 2015 04:36:37 -0400
Post by Josh
Post by Roberto Togni
On Fri, 25 Sep 2015 23:23:45 +0200
Post by Roberto Togni
On Thu, 24 Sep 2015 00:04:37 +0200
Post by Roberto Togni
On Tue, 22 Sep 2015 00:38:28 -0400
Post by Josh
Post by Roberto Togni
On Mon, 21 Sep 2015 01:05:59 -0400
Post by Josh
Post by Roberto Togni
On Mon, 14 Sep 2015 20:59:46 +0200
Post by Roberto Togni
On Sun, 13 Sep 2015 00:26:42 -0400
Post by Josh
I compiled r37524 with a newer FFmpeg and got different but still
seemingly useless results from gdb so I ran Dr Memory, both logs are
included in the tar.xz. The logs themselves will get me queued for
http://sourceforge.net/projects/mplayerwin/files/Misc/mpl-bin-r37524-debug-2.tar.xz/download
Hi,
just to keep you updated, I was able to reproduce it with your sample
and get a valid backtrace on linux.
...
sending VFCTRL_SCREENSHOT!
Program received signal SIGSEGV, Segmentation fault.
0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
1340 Y1 += lumSrc[j][i * 2] * lumFilter[j];
(gdb) bt
#0 0x0000555555f68625 in yuv2rgb_X_c_template (hasAlpha=0,
target=AV_PIX_FMT_RGB24, y=13, dstW=2386, dest=0x555558be4680 "",
alpSrc=0x0, chrFilterSize=4, chrVSrc=0x5555572d9a48,
chrUSrc=0x55555711f128, chrFilter=0x5555572d76c8, lumFilterSize=1,
lumSrc=0x55555712c5e8, lumFilter=0x55555711e8ba, c=<optimized out>)
at libswscale/output.c:1340
#1 yuv2rgb24_X_c (c=0x555557223520, lumFilter=0x55555711e8ba,
lumSrc=0x55555712c5e8, lumFilterSize=1, chrFilter=0x5555572d76c8,
chrUSrc=0x55555711f128, chrVSrc=0x5555572d9a48, chrFilterSize=4,
alpSrc=0x0, dest=0x555558be4680 "", dstW=2386, y=13)
at libswscale/output.c:1515
#2 0x0000555555f4dc9e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=13, sliceH=<optimized out>)
at libswscale/vscale.c:129
#3 0x0000555555f3dc81 in swscale (c=0x5555572b12c0,
src=0x55555711e8a0, srcStride=0x1000, srcSliceY=1460470520,
srcSliceH=1460470480, dst=0x55555711f128, dstStride=0x7fffffffca80) at
libswscale/swscale.c:682 #4 0x0000555555f3ef4b in sws_scale
(c=0x5555572b12c0, srcSlice=0x7fffffffca90, srcStride=0x55555712c5e8,
srcSliceY=1, srcSliceH=1462597320, dst=0x7fffffffcab0,
dstStride=0x5555570f4c60) at libswscale/swscale.c:1263
#5 0x00005555558295da in draw_slice (vf=0x5555570f53b0,
src=0x7fffffffcb90, stride=0x7fffffffcb80, w=1920, h=16, x=1460791456,
y=16)
at libmpcodecs/vf_screenshot.c:64
#6 0x0000555555826021 in draw_slice (s=<optimized out>, src=<optimized
out>, offset=<optimized out>, y=<optimized out>, type=<optimized out>,
height=<optimized out>) at libmpcodecs/vd_ffmpeg.c:588
#7 0x0000555555eb48e4 in ff_draw_horiz_band (avctx=0x5555570f69a0,
cur=<optimized out>, last=<optimized out>, y=16, h=16,
picture_structure=3, first_field=0, low_delay=0)
at libavcodec/mpegutils.c:77
#8 0x0000555555b95135 in ff_mpeg_draw_horiz_band
libavcodec/mpegvideo.c:2720 #9 0x0000555555b60db5 in mpeg_decode_slice
libavcodec/mpeg12dec.c:1927 #10 0x0000555555b63b35 in decode_chunks
buf_size=2111) at libavcodec/mpeg12dec.c:2759 #11 0x0000555555b645ab in
mpeg_decode_frame (avctx=0x5555570f69a0, data=0x5555570f6760,
got_output=0x7fffffffcf60, avpkt=<optimized out>) at
libavcodec/mpeg12dec.c:2836 #12 0x0000555555c6762e in
avcodec_decode_video2 (avctx=0x5555570f69a0, picture=0x5555570f6760,
got_picture_ptr=0x7fffffffcf60, avpkt=0x7fffffffcf90) at
libavcodec/utils.c:2096 ---Type <return> to continue, or q <return> to
quit--- #13 0x0000555555826e5f in decode (sh=0x555556edc410,
data=0x1000, len=1460848104, flags=-12400) at
libmpcodecs/vd_ffmpeg.c:949 #14 0x0000555555775f4f in decode_video
(sh_video=0x555556edc410, start=0x555556f088c0 "", in_size=2111,
drop_frame=0, pts=1.083922266960144, full_frame=0x7fffffffd0b0)
at libmpcodecs/dec_video.c:398
#15 0x00005555556dd772 in update_video (blit_frame=0x7fffffffd158)
at mplayer.c:2484
#16 0x00005555556d0980 in main (argc=5, argv=0x7fffffffe288) at
mplayer.c:3811
You're probably right with the commit that broke it, I'm checking if
swscale needs to be called differently now.
May be a problem in ffmpeg, see https://trac.ffmpeg.org/ticket/4850
I can get a crash with similar backtrace with
ffmpeg -i mpeg_crash_screenshot.mpg -dsth 1096 -c png -f null /dev/null
Program received signal SIGSEGV, Segmentation fault.
0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
1246 dest[i * 6 + 0] = r_b[Y1];
(gdb) bt
#0 0x0000000000de5a57 in yuv2rgb_write (hasAlpha=0,
target=AV_PIX_FMT_RGB24,
y=1088, _b=0x1e0f266, _g=0x1e0f266, _r=0x1e0f266, A2=0, A1=0,
Y2=<optimized out>, Y1=<optimized out>, i=<optimized out>,
_dest=0x7fffcc7f8040 "") at libswscale/output.c:1246
#1 yuv2rgb_X_c_template (hasAlpha=0, target=AV_PIX_FMT_RGB24, y=1088,
dstW=1920, dest=0x7fffcc7f8040 "", alpSrc=0x0, chrFilterSize=4,
chrVSrc=0x1b4dd30, chrUSrc=0x1b44c70, chrFilter=0x1b6e0c0,
lumFilterSize=4, lumSrc=0x1b4e4f8, lumFilter=0x1b67440,
c=<optimized out>)
at libswscale/output.c:1370
#2 yuv2rgb24_X_c (c=0x1ba75c0, lumFilter=0x1b67440, lumSrc=0x1b4e4f8,
lumFilterSize=4, chrFilter=0x1b6e0c0, chrUSrc=0x1b44c70,
chrVSrc=0x1b4dd30, chrFilterSize=4, alpSrc=0x0, dest=0x7fffcc7f8040
"",
dstW=1920, y=1088) at libswscale/output.c:1515
#3 0x0000000000dca58e in packed_vscale (c=<optimized out>,
desc=<optimized out>, sliceY=1088, sliceH=<optimized out>)
at libswscale/vscale.c:129
#4 0x0000000000dc5d31 in swscale (c=0x1b4e980, src=0x1e0f266,
srcStride=0x0,
srcSliceY=28632888, srcSliceH=28632848, dst=0x1b44c70,
dstStride=0x7fffffffd6f0) at libswscale/swscale.c:682
#5 0x0000000000dc70ba in sws_scale (c=0x1b4e980,
srcSlice=0x7fffffffd700,
srcStride=0x1b4e4f8, srcSliceY=4, srcSliceH=28762304,
dst=0x7fffffffd720,
dstStride=0x7fffffffd7d0) at libswscale/swscale.c:1263
#6 0x000000000050a088 in scale_slice (y=<optimized out>,
link=<optimized out>, field=<optimized out>, mul=<optimized out>,
h=<optimized out>, sws=<optimized out>, cur_pic=<optimized out>,
out_buf=<optimized out>) at libavfilter/vf_scale.c:477
#7 filter_frame (link=0x1b44520, in=0x1e0ecc0) at
libavfilter/vf_scale.c:579
#8 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44520,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#9 0x00000000004a1299 in ff_filter_frame (link=0x1b44520,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#10 0x000000000049f1df in ff_filter_frame_framed (link=0x1b44b20,
frame=0x1e0ecc0) at libavfilter/avfilter.c:1089
#11 0x00000000004a1299 in ff_filter_frame (link=0x1b44b20,
frame=0x1e0ecc0)
at libavfilter/avfilter.c:1173
#12 0x00000000004a53a2 in request_frame (link=0x1b44b20)
at libavfilter/buffersrc.c:378
#13 0x00000000004a50d4 in av_buffersrc_add_frame_internal (
at libavfilter/buffersrc.c:180
#14 0x00000000004a55cd in av_buffersrc_add_frame_flags (ctx=0x1b455e0,
at libavfilter/buffersrc.c:105
#15 0x0000000000487272 in decode_video (ist=0x1b3ca00, pkt=<optimized
out>,
got_output=<optimized out>) at ffmpeg.c:2179
#16 0x00000000004715d3 in process_input_packet (pkt=<optimized out>,
ist=<optimized out>) at ffmpeg.c:2327
#17 process_input (file_index=<optimized out>) at ffmpeg.c:3833
#18 transcode_step () at ffmpeg.c:3921
#19 transcode () at ffmpeg.c:3974
#20 main (argc=28559872, argv=0x7fffffffe010) at ffmpeg.c:4157
(gdb)
Seems that the problem is related to slices, in MPlayer it works for the
first slice but fails for the 2nd (slice height is 16; offset 0 is ok,
offset 16 crashes).
The attached workaroud fixes the crash, but produces a wrong picture;
unless I missed some stupid detail, it should be equivalent to the old
code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I compiled the latest MPlayer trunk/FFmpeg master that has a fix for
FFmpeg #4850 and without your patch.
There is no crash but it simply quits (no screenshot saved) after
'sending VFCTRL_SCREENSHOT!' when slices are enabled, with the exception
of mpeg_crash_ss_beetlejuice.mpg it quits slices or noslices.
Fix for #4850 did not stop the crash for me too.
What I found out is that if I force FFmpeg to use the old scaler
filters, everything works fine.
I was still unable to find out if something changed in the way you need
to use swscaler (I don't think so), if there is a bug in the new
swscaler, or if we always used it in the wrong way and we were just
lucky up to now.
I'm not much worried about vf_screenshot, but about all other uses of
the scaler code in the mail player.
If you want to test it, just comment out #define NEW_FILTER at the end
of ffmpeg/libswscale/swscale_internal.h and recompile everything.
This is a possible workaround for people using the internal ffmpeg copy
of MPlayer, it will not help if you use a system-wide install of ffmpeg.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
As of current FFmpeg master with disabling the new filter everything
works fine so far.
I found a way to produce a simple test case that fails in the exact way
as MPlayer.
See ffmpeg ticket https://trac.ffmpeg.org/ticket/4877
Crash is fixed with slices with latest ffmpeg, but image is wrong.
See https://trac.ffmpeg.org/ticket/4881
The second sample still crashes with -noslices, but up to now I was
unable to create a simple test case to report it.
Fixed in FFmpeg git.
The only problem remaining is the second sample with -noslices, it
still crashes for me on Linux X86_64. I'll check if I can debug it
in MPlayer, since I can't create a stand-alone testcase.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Much appreciation on fixing this issue so far. Thanks Roberto.
Finally fixed.
It was a MPlayer bug in the use of swscaler, not related to the new
sws filter code. I have no idea why it was not crashing also with the
old code.
Ciao,
Roberto
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
I did a fresh checkout of FFmpeg from git a long time ago and forgot to
disable the new filter since then. 'beetlejuice' wasn't crashing anymore
slices/noslices but either way just produced a 0.99MB black screenshot
(it was the ONLY video doing that). r37733 actually fixed that.

I can't find any reason not to leave the new filter enabled.

Loading...