Re: [FFmpeg-devel] mac, ios clock_gettime patch
> > So how is it possible that clock_gettime() must not be defined to allow > starting the executable, but this object has to be? Because I build ffmpeg with cc and linker flag "-mmacosx-version-min=10.7" to support lower os versions. If no such flag, the target os is the sdk version you use, e.g. 10.x. Then the symbol is not compiled as a weak symbol and it must be resolved at runtime. You can see all weak symbols using `nm -mg libavcodec.dylib |grep -E "undefined.*weak"` ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] mac, ios clock_gettime patch
2017-02-05 3:12 GMT+01:00 Wang Bin: >> >> dyld: Symbol not found: _kVTCompressionPropertyKey_H264EntropyMode > > What system? kVTCompressionPropertyKey_H264EntropyMode is > available since macOS 10.9 and iOS 10.8. Indicating this is about 10.7. > If targeting older system, we have to define it's value like > kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder > in videotoolbox.c So how is it possible that clock_gettime() must not be defined to allow starting the executable, but this object has to be? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] mac, ios clock_gettime patch
> > dyld: Symbol not found: _kVTCompressionPropertyKey_H264EntropyMode What system? kVTCompressionPropertyKey_H264EntropyMode is available since macOS 10.9 and iOS 10.8. If targeting older system, we have to define it's value like kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder in videotoolbox.c ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] mac, ios clock_gettime patch
2017-01-03 7:26 GMT+01:00 Wang Bin: > If ffmpeg is build with iOS 10 sdk, program will crash on iOS > 9. This patch fixes the crash. Does anybody know why clock_gettime() behaves differently than kVTCompressionPropertyKey_H264EntropyMode in libavcodec/videotoolboxenc.c? Iiuc, the call to clock_gettime() crashes at runtime after a null pointer dereference, trying to start ffmpeg on systems without above symbol causes the following (I couldn't test myself): dyld: Symbol not found: _kVTCompressionPropertyKey_H264EntropyMode Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] mac, ios clock_gettime patch
2017-01-09 11:46 GMT+08:00 Steven Liu: > > > 2017-01-09 11:06 GMT+08:00 Wang Bin : > >> ping >> >> 2017-01-03 14:26 GMT+08:00 Wang Bin : >> >> > If ffmpeg is build with iOS 10 sdk, program will crash on iOS 9. This >> > patch fixes the crash. >> > >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > LGTM > > [PATCH] avutil/tile: check clock_gettime at runtime for apple platforms clock_gettime is avalible since macOS 10.12 and iOS 10.0. Because of weak linking, clock_gettime can be build without error with new macOS/iOS sdk, but the symbol may not exist on the target system. Explicitly checking the symbol is required. https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html Signed-off-by: Wang Bin --- libavutil/time.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) applied Thanks ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] mac, ios clock_gettime patch
2017-01-09 11:06 GMT+08:00 Wang Bin: > ping > > 2017-01-03 14:26 GMT+08:00 Wang Bin : > > > If ffmpeg is build with iOS 10 sdk, program will crash on iOS 9. This > > patch fixes the crash. > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel LGTM ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] mac, ios clock_gettime patch
ping 2017-01-03 14:26 GMT+08:00 Wang Bin: > If ffmpeg is build with iOS 10 sdk, program will crash on iOS 9. This > patch fixes the crash. > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] mac, ios clock_gettime patch
If ffmpeg is build with iOS 10 sdk, program will crash on iOS 9. This patch fixes the crash. 0001-check-clock_gettime-at-runtime-for-apple-platforms.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel