-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using SAF link in concat demuxer input file causes segfault in ffmpeg-kit #847
Comments
PR #846 adds |
I appreciate you creating a PR address a fix. But, before talking about a fix, we must agree on the problem. And, I don't see a clear analysis about why |
Stack trace decoded with Same results manually reformatted for ease of analysis:
In the This results in calls to
|
Thanks for the analysis. I agree on most of your findings. I'll mark this issue as bug, since it is an |
Fixed on the |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Re-opened since we haven't released this yet |
We have decided to retire the The fix for this issue has been applied to the development branch. If you need it, you will need to build the fix yourself. Thank you for your understanding and support. |
Description
Using SAF link in concat demuxer input file causes segfault in ffmpeg-kit.
Expected behavior
Concat should be possible for files accessed through SAF.
Current behavior
Segfault in
saf_open
andsaf_close
.To Reproduce
In Android code:
0. Create SAF links from Android content URIs using
getSafParameterForRead
.mylist.txt
) with said SAF links (even one SAF link here is enough to cause segfault):ffmpeg -y -f concat -safe 0 -protocol_whitelist saf,file,crypto -i mylist.txt -c copy saf:3.mp4
Segfault will occur.
Logs
Raw error:
ndk-stack:
Environment
Android
onlyv6.0
main
2022.3.1
25.1.8937393
Other
Using of SAF links in concat demuxer input files was previously mentioned in #502
The problem is cased by the following code:
The assumption that
saf_open
/saf_close
are only called from a Java thread is wrong as files are read afterdmx0:concat
thread is forked. Segfault occurs asenv
is not checked before usage (null reference is returned).The text was updated successfully, but these errors were encountered: