[FFmpeg-trac] #10140(undetermined:new): swscale() crash in Android starting from API31
FFmpeg
trac at avcodec.org
Tue Jan 17 14:17:31 EET 2023
#10140: swscale() crash in Android starting from API31
-------------------------------------+-------------------------------------
Reporter: fabienst | Owner: (none)
Type: defect | Status: new
Priority: important | Component:
| undetermined
Version: git-master | Resolution:
Keywords: swscale | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by fabienst):
Additional information:
- Crash happens on **other pictures too**.
- Crash happens **on x86_64** (emulated device with api31) but **not on
arm8** (real device with api 31)
- Input to swscale() is the same in both cases.
- To reproduce simply with a call to swscale() I managed to produce the
file containg the src & dst arrays. You can find them attached.
- API30-dst
- API30-src
- API31-dst
- API31-src
- Other parameter values are:
- For input: format: AV_PIX_FMT_RGBA, height: 120, stride: 1700, width:
425
- For output: format: AV_PIX_FMT_RGBA, height: 45, stride: 640, width:
160
- Algorithm: Lanczos
- Parameter p0: 3.0
- Code to produce these files was (for usage in the function
{{{native_rescale_impl}}} above):
{{{
FILE* pFile;
char* yourFilePath = "/storage/emulated/0/DCIM/test_pics/input";
// Reserve memory for your readed buffer
char* readedBuffer = malloc(4);
if (readedBuffer==0){
LOGI("Can't reserve memory for Test!");
}
// Write your buffer to disk.
pFile = fopen(yourFilePath,"wb");
if (pFile){
fwrite(*src_planes, 4, src.info.width * src.info.height,
pFile);
LOGI("Wrote to file!");
}
else{
LOGI("Something wrong writing to File.");
}
fclose(pFile);
char* outFilePath = "/storage/emulated/0/DCIM/test_pics/output";
// Reserve memory for your readed buffer
int readedBuffer2 = malloc(4);
if (readedBuffer2==0){
LOGI("Can't reserve memory for Test!");
}
// Write your buffer to disk.
pFile = fopen(outFilePath,"wb");
if (pFile){
fwrite(*dst_planes, 4, dst.info.width * dst.info.height,
pFile);
LOGI("Wrote to file!");
} else {
LOGI("Something wrong writing to File.");
}
fclose(pFile);
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10140#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list