[FFmpeg-devel] fix SDL device on MacOS
Lukasz M
lukasz.m.luki at gmail.com
Tue Jan 14 23:20:53 CET 2014
Hi,
Following command cause termination on Mac OS
./ffmpeg -i ~/input.mp4 -f sdl a
output:
ffmpeg version N-59836-gff5fa37 Copyright (c) 2000-2014 the FFmpeg
developers
built on Jan 14 2014 23:12:21 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --enable-opengl
libavutil 52. 62.100 / 52. 62.100
libavcodec 55. 48.101 / 55. 48.101
libavformat 55. 23.104 / 55. 23.104
libavdevice 55. 6.100 / 55. 6.100
libavfilter 4. 1.100 / 4. 1.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/lmr/input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Larry Sanders
Duration: 00:47:01.80, start: 0.000000, bitrate: 751 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 720x404, 626 kb/s, 25 fps, 25 tbr, 20k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 117 kb/s (default)
Metadata:
handler_name : SoundHandler
Jan 14 23:17:15 Mac-mini-Lukasz-2.local ffmpeg[22594] <Error>:
kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
Jan 14 23:17:15 Mac-mini-Lukasz-2.local ffmpeg[22594] <Error>:
kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as
they are logged.
Jan 14 23:17:15 Mac-mini-Lukasz-2.local ffmpeg[22594] <Error>:
kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
Jan 14 23:17:15 Mac-mini-Lukasz-2.local ffmpeg[22594] <Error>:
kCGErrorInvalidConnection: CGSNewWindowWithOpaqueShape: Invalid connection
2014-01-14 23:17:15.720 ffmpeg[22594:2103] *** Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason: 'Error
(1002) creating CGSWindow on line 263'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff8d9c8f56
__exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8abcfd5e
objc_exception_throw + 43
2 CoreFoundation 0x00007fff8d9c8d8a +[NSException
raise:format:arguments:] + 106
3 CoreFoundation 0x00007fff8d9c8d14 +[NSException
raise:format:] + 116
4 AppKit 0x00007fff9061d16f
_NSCreateWindowWithOpaqueShape2 + 755
5 AppKit 0x00007fff9056b6c5 -[NSWindow
_commonAwake] + 1875
6 AppKit 0x00007fff9056a360 -[NSWindow
_commonInitFrame:styleMask:backing:defer:] + 1871
7 AppKit 0x00007fff905693af -[NSWindow
_initContent:styleMask:backing:defer:contentView:] + 1502
8 AppKit 0x00007fff90568d7f -[NSWindow
initWithContentRect:styleMask:backing:defer:] + 47
9 libSDL-1.2.0.dylib 0x00000001018e78f6
-[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] + 294
10 libSDL-1.2.0.dylib 0x00000001018e5505 QZ_SetVideoMode
+ 2837
11 libSDL-1.2.0.dylib 0x00000001018dcaf5 SDL_SetVideoMode
+ 917
12 ffmpeg 0x00000001007ff9db
avdevice_control_message + 13051
13 libSDL-1.2.0.dylib 0x00000001019010d9 RunThread + 9
14 libsystem_c.dylib 0x00007fff8bf9f8bf _pthread_start +
335
15 libsystem_c.dylib 0x00007fff8bfa2b75 thread_start + 13
)
terminate called throwing an exceptionAbort trap: 6
I found solution here:
http://forums.libsdl.org/viewtopic.php?p=26230&sid=6ba7f9f0e12717d9ded502bf89dc5be2
"I think the problem is that main is declared before SDL.h is included, you
should include SDL before main so that SDL substitutes main() with
SDL_main() and does it's internal initializations. You should also link
with SDLmain."
It solves the problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffmpeg-fix-use-of-SDL-device-under-Mac-OS.patch
Type: application/octet-stream
Size: 698 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140114/c7ffbe15/attachment.obj>
More information about the ffmpeg-devel
mailing list