Opened 13 years ago
Closed 13 years ago
#975 closed defect (fixed)
commit 151ecc2aecd81718e2520936dd3c537d7e6fe2fc causes segfault when using overlay filter
Reported by: | TimNich | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avfilter |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Command:-
ffmpeg -i BRD35721202.mxf \
-vf "movie=logo.png [logo];
[in][logo] overlay=6:4 " \
-c:v prores -profile:v 0 \
-an -y ./BRD35721202-dog.mov
Causes a segfault on the above commit, but works fine on the previous (non tracked) commit b8c16558828e73e933ae73b5888345d50e897dfc
Attachments (5)
Change History (15)
follow-up: 2 comment:1 by , 13 years ago
follow-up: 4 comment:2 by , 13 years ago
Replying to saste:
Can't reproduce, please provide a sample.
Uploaded a sample png logo.
Also, which parameters are required for reproducing the crash? Does it depend on the main input file or on the logo file?
I have tried different source format files 720x576 in uncompressed V210 codec in mxf and pal-DV in quicktime wrappers with the same result.
Changing the logo to a .jpg worked as did .gif but every .png caused a segfault including those with transparency set and those without.
Provide the simplest possible commandline which reproduces the crash.
The commandline already provided is about the simplest to replicate the issue. Replacing the '-vf "movie=logo.png [logo];' with '-vf "color=red:10x20;' worked.
The issue seems to be with the "movie" filter and png handling...
comment:3 by , 13 years ago
OK not all png's fail. small3.png works, but when resized and saved as small4.png it fails
follow-up: 5 comment:4 by , 13 years ago
Replying to nichot20:
Replying to saste:
Can't reproduce, please provide a sample.
Uploaded a sample png logo.
Also, which parameters are required for reproducing the crash? Does it depend on the main input file or on the logo file?
I have tried different source format files 720x576 in uncompressed V210 codec in mxf and pal-DV in quicktime wrappers with the same result.
Changing the logo to a .jpg worked as did .gif but every .png caused a segfault including those with transparency set and those without.
Provide the simplest possible commandline which reproduces the crash.
The commandline already provided is about the simplest to replicate the issue. Replacing the '-vf "movie=logo.png [logo];' with '-vf "color=red:10x20;' worked.
The issue seems to be with the "movie" filter and png handling...
I need your main input file, with my test input file it doesn't crash, also complete commandline output may help.
follow-up: 6 comment:5 by , 13 years ago
Replying to saste:
Replying to nichot20:
Replying to saste:
Can't reproduce, please provide a sample.
The issue seems to be with the "movie" filter and png handling...
I need your main input file, with my test input file it doesn't crash, also complete commandline output may help.
I have a 5 sec sample DV format mov that fails, however it is bigger (25M) than the 2.5M upload limit. Where should I put it?
Full console output:-
=============================================start=======================================
tim@V-devel:~/test> ffmpeg-bisect-bad -i in.mov -vf "movie=logo2.png [logo]; [in][logo] overlay=6:4" -c:v dvvideo -an -y out.mov
ffmpeg version N-37401-g151ecc2-by_Tim Copyright (c) 2000-2012 the FFmpeg developers
built on Feb 3 2012 14:59:35 with gcc 4.6.2
configuration: --extra-version=by_Tim --enable-static --disable-shared --enable-gpl --enable-nonfree --enable-version3 --prefix=/mnt/msds-store-0/tim/ffmpeg-tux/usr/local --libdir=/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/lib64 --enable-runtime-cpudetect --extra-cflags='-static -I/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/include' --extra-ldflags='-static -L/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/lib64' --progs-suffix=-bisect-bad --enable-libfaac --enable-libx264 --enable-libfreetype
libavutil 51. 36.100 / 51. 36.100
libavcodec 54. 0.102 / 54. 0.102
libavformat 54. 0.100 / 54. 0.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2012-02-03 16:21:52
encoder : Lavf54.0.100
Duration: 00:00:05.72, start: 0.000000, bitrate: 28801 kb/s
Stream #0:0(eng): Video: dvvideo (dvcp / 0x70637664), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 28800 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 2012-02-03 16:21:52
handler_name :
[buffer @ 0x177e7e0] w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:64/45 sws_param:
Segmentation fault
tim@V-devel:~/test>
=========================================end============================================
Full uncut output of previous git:-
=========================================start===========================================
tim@V-devel:~/test> ffmpeg-bisect -i in.mov -vf "movie=logo2.png [logo]; [in][logo] overlay=6:4" -c:v dvvideo -an -y out.mov
ffmpeg version N-37374-gb8c1655-by_Tim Copyright (c) 2000-2012 the FFmpeg developers
built on Feb 3 2012 14:35:37 with gcc 4.6.2
configuration: --extra-version=by_Tim --enable-static --disable-shared --enable-gpl --enable-nonfree --enable-version3 --prefix=/mnt/msds-store-0/tim/ffmpeg-tux/usr/local --libdir=/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/lib64 --enable-runtime-cpudetect --extra-cflags='-static -I/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/include' --extra-ldflags='-static -L/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/lib64' --progs-suffix=-bisect --enable-libfaac --enable-libx264 --enable-libfreetype
libavutil 51. 35.101 / 51. 35.101
libavcodec 54. 0.102 / 54. 0.102
libavformat 54. 0.100 / 54. 0.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2012-02-03 16:21:52
encoder : Lavf54.0.100
Duration: 00:00:05.72, start: 0.000000, bitrate: 28801 kb/s
Stream #0:0(eng): Video: dvvideo (dvcp / 0x70637664), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 28800 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 2012-02-03 16:21:52
handler_name :
[buffer @ 0x177e7e0] w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:64/45 sws_param:
[movie @ 0x1778780] seek_point:0 format_name:(null) file_name:logo2.png stream_index:0
[overlay @ 0x177acc0] auto-inserting filter 'auto-inserted scale 0' between the filter 'Parsed_movie_0' and the filter 'Parsed_overlay_1'
[scale @ 0x177be40] w:53 h:15 fmt:rgba -> w:53 h:15 fmt:yuva420p flags:0x4
[overlay @ 0x177acc0] main w:720 h:576 fmt:yuv420p overlay x:6 y:4 w:53 h:15 fmt:yuva420p
[overlay @ 0x177acc0] main_tb:1/1000000 overlay_tb:1/25 -> tb:1/1000000 exact:1
Output #0, mov, to 'out.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2012-02-03 16:21:52
encoder : Lavf54.0.100
Stream #0:0(eng): Video: dvvideo (dvcp / 0x70637664), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc
Metadata:
creation_time : 2012-02-03 16:21:52
handler_name :
Stream mapping:
Press [q] to stop, ? for help
frame= 143 fps= 0 q=0.0 Lsize= 20110kB time=00:00:05.72 bitrate=28801.2kbits/s
video:20109kB audio:0kB global headers:0kB muxing overhead 0.004230%
tim@V-devel:~/test>
==========================================end===========================================
follow-up: 7 comment:6 by , 13 years ago
Replying to nichot20:
Replying to saste:
Replying to nichot20:
Replying to saste:
Can't reproduce, please provide a sample.
The issue seems to be with the "movie" filter and png handling...
I need your main input file, with my test input file it doesn't crash, also complete commandline output may help.
I have a 5 sec sample DV format mov that fails, however it is bigger (25M) than the 2.5M upload limit. > Where should I put it?
You can cut the input file with ffmpeg:
ffmpeg -i INPUT -t 10 -acodec copy -vcodec copy OUTPUT.SHORT
our you can use the humble dd:
cat INPUT | dd bs=1024 count=2048 > OUTPUT.SHORT
otherwise you can upload the complete file to samples.ffmpeg.org.
comment:7 by , 13 years ago
Replying to saste:
Replying to nichot20:
Replying to saste:
Replying to nichot20:
Replying to saste:
Can't reproduce, please provide a sample.
The issue seems to be with the "movie" filter and png handling...
I need your main input file, with my test input file it doesn't crash, also complete commandline output may help.
I have a 5 sec sample DV format mov that fails, however it is bigger (25M) than the 2.5M upload limit. > Where should I put it?
You can cut the input file with ffmpeg:
ffmpeg -i INPUT -t 10 -acodec copy -vcodec copy OUTPUT.SHORT
Hmmm. but not shorter than 1 second which is still too large....
our you can use the humble dd:
cat INPUT | dd bs=1024 count=2048 > OUTPUT.SHORT
otherwise you can upload the complete file to samples.ffmpeg.org.
I have managed to make a 1 second sample (in.mp4) with libx264 that still fails for me, but works on the previous commit.
comment:8 by , 13 years ago
OK I have narrowed the issue down a little.
Previously I had only managed to git bisect on the origin/master, not the qatar/master tracking branch.
However I have now patched in the
3715d841a619f1cbc4776d9b00575dae6fb6534a
to
af79a0c48a41fd99b674b39ac509ae442974715d
changes onto
b8c16558828e73e933ae73b5888345d50e897dfc
These include the changes to the png DSP functions.
I can confirm that a build based on the above 4 patches up from the git bisect good fails. Suggesting that the issue is within the changes to the DSP to use yasm.
My build environment is OpenSuSE 12.1 with gcc 4.6.2 & yasm yasm 1.1.0.2352
comment:9 by , 13 years ago
It would appear that this bug has now been fixed by commit:-
9b027c0d0794b50e3b638cca4bed925638ab68bc
Which has the commit message:-
dsputil: set STRIDE_ALIGN to 16 for x86 also.
This fixes crashes in e.g. PNG decoding with SSE2 enabled. In fact, many
x86 optimizations for codecs assume that our buffer strides are 16-byte
aligned.
Applying this patch on my previously broken build fixes it, and I can confirm that:-
f2b20b7a8b6fcbcd8cc669f5211e4e2ed7d8e9f3 08/02/2012 23:44
ffmpeg git-master works OK.
I therefore believe this ticket can be closed.
Can't reproduce, please provide a sample.
Also, which parameters are required for reproducing the crash? Does it depend on the main input file or on the logo file?
Provide the simplest possible commandline which reproduces the crash.