Opened 12 years ago

Closed 12 years ago

#546 closed defect (fixed)

ffplay crashes when resizing/fullscreen on osx 10.6.6 and libsdl 1.2.14

Reported by: cbsrobot Owned by:
Priority: normal Component: ffplay
Version: git-master Keywords: sdl
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

ffplay crashes when resizing or switsching to fullscreen on OSX 10.6.6 and libsdl 1.2.14 with the following message:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000000000000001d
0x000000010109629e in SDL_DisplayYUV_SW ()

I tested it with several filetypes.

$ ffplay ~/Desktop/10s_1280x720_baseline.mp4

ffplay version N-33134-g53d5c46, Copyright (c) 2003-2011 the FFmpeg developers

built on Sep 30 2011 19:38:20 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
configuration: --enable-gpl --enable-version2 --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libvpx --enable-libmp3lame --enable-libfreetype --enable-libopenjpeg --prefix=/usr/local
libavutil 51. 18. 0 / 51. 18. 0
libavcodec 53. 19. 0 / 53. 19. 0
libavformat 53. 13. 0 / 53. 13. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 6 / 2. 43. 6
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '~/Desktop/10s_1280x720_baseline.mov':

Metadata:

major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 1970-01-01 00:00:00
encoder : Lavf52.92.0

Duration: 00:00:10.00, start: 0.000000, bitrate: 1101 kb/s

Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1099 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:

creation_time : 1970-01-01 00:00:00

gdb$ bt
#0 0x000000010109629e in SDL_DisplayYUV_SW ()
#1 0x000000010109412a in SDL_DisplayYUVOverlay ()
#2 0x000000010000451e in exit_program ()

gdb$ disass $pc-32,$pc+32
Dump of assembler code for function SDL_DisplayYUV_SW:
0x0000000101095f50 <SDL_DisplayYUV_SW+0>: push rbp
0x0000000101095f51 <SDL_DisplayYUV_SW+1>: mov rbp,rsp
0x0000000101095f54 <SDL_DisplayYUV_SW+4>: mov QWORD PTR [rbp-0x28],rbx
0x0000000101095f58 <SDL_DisplayYUV_SW+8>: mov QWORD PTR [rbp-0x20],r12
0x0000000101095f5c <SDL_DisplayYUV_SW+12>: mov QWORD PTR [rbp-0x18],r13
0x0000000101095f60 <SDL_DisplayYUV_SW+16>: mov QWORD PTR [rbp-0x10],r14
0x0000000101095f64 <SDL_DisplayYUV_SW+20>: mov QWORD PTR [rbp-0x8],r15
0x0000000101095f68 <SDL_DisplayYUV_SW+24>: add rsp,0xffffffffffffff80
0x0000000101095f6c <SDL_DisplayYUV_SW+28>: mov r12,rsi
0x0000000101095f6f <SDL_DisplayYUV_SW+31>: mov QWORD PTR [rbp-0x40],rdx
0x0000000101095f73 <SDL_DisplayYUV_SW+35>: mov QWORD PTR [rbp-0x48],rcx
0x0000000101095f77 <SDL_DisplayYUV_SW+39>: mov r14,QWORD PTR [rsi+0x28]
0x0000000101095f7b <SDL_DisplayYUV_SW+43>: cmp WORD PTR [rdx],0x0
0x0000000101095f7f <SDL_DisplayYUV_SW+47>: jne 0x101095f90 <SDL_DisplayYUV_SW+64>
0x0000000101095f81 <SDL_DisplayYUV_SW+49>: cmp WORD PTR [rdx+0x2],0x0
0x0000000101095f86 <SDL_DisplayYUV_SW+54>: je 0x101096110 <SDL_DisplayYUV_SW+448>
0x0000000101095f8c <SDL_DisplayYUV_SW+60>: nop DWORD PTR [rax+0x0]
0x0000000101095f90 <SDL_DisplayYUV_SW+64>: mov rbx,QWORD PTR [r14]
0x0000000101095f93 <SDL_DisplayYUV_SW+67>: test rbx,rbx
0x0000000101095f96 <SDL_DisplayYUV_SW+70>: je 0x101096296 <SDL_DisplayYUV_SW+838>
0x0000000101095f9c <SDL_DisplayYUV_SW+76>: mov DWORD PTR [rbp-0x38],0x1
0x0000000101095fa3 <SDL_DisplayYUV_SW+83>: mov DWORD PTR [rbp-0x34],0x0
0x0000000101095faa <SDL_DisplayYUV_SW+90>: mov eax,DWORD PTR [r12]
0x0000000101095fae <SDL_DisplayYUV_SW+94>: cmp eax,0x55595659
0x0000000101095fb3 <SDL_DisplayYUV_SW+99>: je 0x101096220 <SDL_DisplayYUV_SW+720>
0x0000000101095fb9 <SDL_DisplayYUV_SW+105>: jbe 0x101096010 <SDL_DisplayYUV_SW+192>
0x0000000101095fbb <SDL_DisplayYUV_SW+107>: cmp eax,0x56555949
0x0000000101095fc0 <SDL_DisplayYUV_SW+112>: je 0x101096240 <SDL_DisplayYUV_SW+752>
0x0000000101095fc6 <SDL_DisplayYUV_SW+118>: cmp eax,0x59565955
0x0000000101095fcb <SDL_DisplayYUV_SW+123>: je 0x101096170 <SDL_DisplayYUV_SW+544>
0x0000000101095fd1 <SDL_DisplayYUV_SW+129>: lea rdi,[rip+0x259f8] # 0x1010bb9d0
0x0000000101095fd8 <SDL_DisplayYUV_SW+136>: xor eax,eax
0x0000000101095fda <SDL_DisplayYUV_SW+138>: call 0x10106a3e0 <SDL_SetError>
0x0000000101095fdf <SDL_DisplayYUV_SW+143>: mov eax,0xffffffff
0x0000000101095fe4 <SDL_DisplayYUV_SW+148>: nop WORD PTR [rax+rax+0x0]
0x0000000101095fea <SDL_DisplayYUV_SW+154>: nop WORD PTR [rax+rax+0x0]
0x0000000101095ff0 <SDL_DisplayYUV_SW+160>: mov rbx,QWORD PTR [rbp-0x28]
0x0000000101095ff4 <SDL_DisplayYUV_SW+164>: mov r12,QWORD PTR [rbp-0x20]
0x0000000101095ff8 <SDL_DisplayYUV_SW+168>: mov r13,QWORD PTR [rbp-0x18]
0x0000000101095ffc <SDL_DisplayYUV_SW+172>: mov r14,QWORD PTR [rbp-0x10]
0x0000000101096000 <SDL_DisplayYUV_SW+176>: mov r15,QWORD PTR [rbp-0x8]
0x0000000101096004 <SDL_DisplayYUV_SW+180>: leave
0x0000000101096005 <SDL_DisplayYUV_SW+181>: ret
0x0000000101096006 <SDL_DisplayYUV_SW+182>: nop WORD PTR cs:[rax+rax+0x0]
0x0000000101096010 <SDL_DisplayYUV_SW+192>: cmp eax,0x32315659
0x0000000101096015 <SDL_DisplayYUV_SW+197>: je 0x101096260 <SDL_DisplayYUV_SW+784>
0x000000010109601b <SDL_DisplayYUV_SW+203>: cmp eax,0x32595559
0x0000000101096020 <SDL_DisplayYUV_SW+208>: jne 0x101095fd1 <SDL_DisplayYUV_SW+129>
0x0000000101096022 <SDL_DisplayYUV_SW+210>: mov rax,QWORD PTR [r12+0x18]
0x0000000101096027 <SDL_DisplayYUV_SW+215>: mov r13,QWORD PTR [rax]
0x000000010109602a <SDL_DisplayYUV_SW+218>: lea r10,[r13+0x3]
0x000000010109602e <SDL_DisplayYUV_SW+222>: lea r15,[r13+0x1]
0x0000000101096032 <SDL_DisplayYUV_SW+226>: nop DWORD PTR [rax+0x0]
0x0000000101096039 <SDL_DisplayYUV_SW+233>: nop DWORD PTR [rax+0x0]
0x0000000101096040 <SDL_DisplayYUV_SW+240>: mov eax,DWORD PTR [rbx+0x28]
0x0000000101096043 <SDL_DisplayYUV_SW+243>: test eax,eax
0x0000000101096045 <SDL_DisplayYUV_SW+245>: jne 0x10109604f <SDL_DisplayYUV_SW+255>
0x0000000101096047 <SDL_DisplayYUV_SW+247>: test DWORD PTR [rbx],0x4005
0x000000010109604d <SDL_DisplayYUV_SW+253>: je 0x101096067 <SDL_DisplayYUV_SW+279>
0x000000010109604f <SDL_DisplayYUV_SW+255>: mov rdi,rbx
0x0000000101096052 <SDL_DisplayYUV_SW+258>: mov QWORD PTR [rbp-0x58],r10
0x0000000101096056 <SDL_DisplayYUV_SW+262>: call 0x10108f830 <SDL_LockSurface>
0x000000010109605b <SDL_DisplayYUV_SW+267>: test eax,eax
0x000000010109605d <SDL_DisplayYUV_SW+269>: mov r10,QWORD PTR [rbp-0x58]
0x0000000101096061 <SDL_DisplayYUV_SW+273>: js 0x1010962d8 <SDL_DisplayYUV_SW+904>
0x0000000101096067 <SDL_DisplayYUV_SW+279>: mov eax,DWORD PTR [rbp-0x38]
0x000000010109606a <SDL_DisplayYUV_SW+282>: test eax,eax
0x000000010109606c <SDL_DisplayYUV_SW+284>: je 0x1010961d0 <SDL_DisplayYUV_SW+640>
0x0000000101096072 <SDL_DisplayYUV_SW+290>: mov rax,QWORD PTR [r14]
0x0000000101096075 <SDL_DisplayYUV_SW+293>: mov r9,QWORD PTR [rax+0x20]
0x0000000101096079 <SDL_DisplayYUV_SW+297>: movzx esi,WORD PTR [rbx+0x18]
0x000000010109607d <SDL_DisplayYUV_SW+301>: mov rax,QWORD PTR [rbx+0x8]
0x0000000101096081 <SDL_DisplayYUV_SW+305>: movzx ecx,BYTE PTR [rax+0x9]
0x0000000101096085 <SDL_DisplayYUV_SW+309>: mov edx,esi
0x0000000101096087 <SDL_DisplayYUV_SW+311>: mov eax,esi
0x0000000101096089 <SDL_DisplayYUV_SW+313>: sar edx,0x1f
0x000000010109608c <SDL_DisplayYUV_SW+316>: idiv ecx
0x000000010109608e <SDL_DisplayYUV_SW+318>: mov ecx,eax
0x0000000101096090 <SDL_DisplayYUV_SW+320>: mov eax,DWORD PTR [rbp-0x34]
0x0000000101096093 <SDL_DisplayYUV_SW+323>: test eax,eax
0x0000000101096095 <SDL_DisplayYUV_SW+325>: je 0x101096190 <SDL_DisplayYUV_SW+576>
0x000000010109609b <SDL_DisplayYUV_SW+331>: mov edx,DWORD PTR [r12+0x4]
0x00000001010960a0 <SDL_DisplayYUV_SW+336>: mov rsi,QWORD PTR [r14+0x20]
0x00000001010960a4 <SDL_DisplayYUV_SW+340>: mov rdi,QWORD PTR [r14+0x18]
0x00000001010960a8 <SDL_DisplayYUV_SW+344>: lea eax,[rdx+rdx]
0x00000001010960ab <SDL_DisplayYUV_SW+347>: sub ecx,eax
0x00000001010960ad <SDL_DisplayYUV_SW+349>: mov DWORD PTR [rsp+0x10],ecx
0x00000001010960b1 <SDL_DisplayYUV_SW+353>: mov DWORD PTR [rsp+0x8],edx
0x00000001010960b5 <SDL_DisplayYUV_SW+357>: mov eax,DWORD PTR [r12+0x8]
0x00000001010960ba <SDL_DisplayYUV_SW+362>: mov DWORD PTR [rsp],eax
0x00000001010960bd <SDL_DisplayYUV_SW+365>: mov r8,r15
0x00000001010960c0 <SDL_DisplayYUV_SW+368>: mov rcx,r10
0x00000001010960c3 <SDL_DisplayYUV_SW+371>: mov rdx,r13
0x00000001010960c6 <SDL_DisplayYUV_SW+374>: call QWORD PTR [r14+0x30]
0x00000001010960ca <SDL_DisplayYUV_SW+378>: mov eax,DWORD PTR [rbx+0x28]
0x00000001010960cd <SDL_DisplayYUV_SW+381>: test eax,eax
0x00000001010960cf <SDL_DisplayYUV_SW+383>: jne 0x1010960d9 <SDL_DisplayYUV_SW+393>
0x00000001010960d1 <SDL_DisplayYUV_SW+385>: test DWORD PTR [rbx],0x4005
0x00000001010960d7 <SDL_DisplayYUV_SW+391>: je 0x1010960e1 <SDL_DisplayYUV_SW+401>
0x00000001010960d9 <SDL_DisplayYUV_SW+393>: mov rdi,rbx
0x00000001010960dc <SDL_DisplayYUV_SW+396>: call 0x10108f8b0 <SDL_UnlockSurface>
0x00000001010960e1 <SDL_DisplayYUV_SW+401>: mov r15d,DWORD PTR [rbp-0x38]
0x00000001010960e5 <SDL_DisplayYUV_SW+405>: test r15d,r15d
0x00000001010960e8 <SDL_DisplayYUV_SW+408>: jne 0x101096200 <SDL_DisplayYUV_SW+688>
0x00000001010960ee <SDL_DisplayYUV_SW+414>: mov rdx,QWORD PTR [rbp-0x48]
0x00000001010960f2 <SDL_DisplayYUV_SW+418>: mov esi,0x1
0x00000001010960f7 <SDL_DisplayYUV_SW+423>: mov rdi,rbx
0x00000001010960fa <SDL_DisplayYUV_SW+426>: call 0x101091960 <SDL_UpdateRects>
0x00000001010960ff <SDL_DisplayYUV_SW+431>: xor eax,eax
0x0000000101096101 <SDL_DisplayYUV_SW+433>: jmp 0x101095ff0 <SDL_DisplayYUV_SW+160>
0x0000000101096106 <SDL_DisplayYUV_SW+438>: nop WORD PTR cs:[rax+rax+0x0]
0x0000000101096110 <SDL_DisplayYUV_SW+448>: movzx ecx,WORD PTR [rdx+0x4]
0x0000000101096114 <SDL_DisplayYUV_SW+452>: movzx eax,cx
0x0000000101096117 <SDL_DisplayYUV_SW+455>: cmp eax,DWORD PTR [rsi+0x4]
0x000000010109611a <SDL_DisplayYUV_SW+458>: jl 0x101095f90 <SDL_DisplayYUV_SW+64>
0x0000000101096120 <SDL_DisplayYUV_SW+464>: movzx esi,WORD PTR [rdx+0x6]
0x0000000101096124 <SDL_DisplayYUV_SW+468>: movzx edi,si
0x0000000101096127 <SDL_DisplayYUV_SW+471>: cmp edi,DWORD PTR [r12+0x8]
0x000000010109612c <SDL_DisplayYUV_SW+476>: jl 0x101095f90 <SDL_DisplayYUV_SW+64>
0x0000000101096132 <SDL_DisplayYUV_SW+482>: mov rbx,QWORD PTR [rbp-0x48]
0x0000000101096136 <SDL_DisplayYUV_SW+486>: movzx edx,WORD PTR [rbx+0x4]
0x000000010109613a <SDL_DisplayYUV_SW+490>: cmp cx,dx
0x000000010109613d <SDL_DisplayYUV_SW+493>: je 0x101096275 <SDL_DisplayYUV_SW+805>
0x0000000101096143 <SDL_DisplayYUV_SW+499>: movzx edx,dx
0x0000000101096146 <SDL_DisplayYUV_SW+502>: add eax,eax
0x0000000101096148 <SDL_DisplayYUV_SW+504>: cmp edx,eax
0x000000010109614a <SDL_DisplayYUV_SW+506>: jne 0x101095f90 <SDL_DisplayYUV_SW+64>
0x0000000101096150 <SDL_DisplayYUV_SW+512>: mov rax,QWORD PTR [rbp-0x48]
0x0000000101096154 <SDL_DisplayYUV_SW+516>: movzx edx,WORD PTR [rax+0x6]
0x0000000101096158 <SDL_DisplayYUV_SW+520>: lea eax,[rdi+rdi]
0x000000010109615b <SDL_DisplayYUV_SW+523>: cmp edx,eax
0x000000010109615d <SDL_DisplayYUV_SW+525>: jne 0x101095f90 <SDL_DisplayYUV_SW+64>
0x0000000101096163 <SDL_DisplayYUV_SW+531>: mov DWORD PTR [rbp-0x34],0x1
0x000000010109616a <SDL_DisplayYUV_SW+538>: jmp 0x101096286 <SDL_DisplayYUV_SW+822>
0x000000010109616f <SDL_DisplayYUV_SW+543>: nop
0x0000000101096170 <SDL_DisplayYUV_SW+544>: mov rax,QWORD PTR [r12+0x18]
0x0000000101096175 <SDL_DisplayYUV_SW+549>: mov r13,QWORD PTR [rax]
0x0000000101096178 <SDL_DisplayYUV_SW+552>: inc r13
0x000000010109617b <SDL_DisplayYUV_SW+555>: lea r10,[r13+0x1]
0x000000010109617f <SDL_DisplayYUV_SW+559>: mov r15,QWORD PTR [rax]
0x0000000101096182 <SDL_DisplayYUV_SW+562>: jmp 0x101096040 <SDL_DisplayYUV_SW+240>
0x0000000101096187 <SDL_DisplayYUV_SW+567>: nop WORD PTR [rax+rax+0x0]
0x0000000101096190 <SDL_DisplayYUV_SW+576>: mov eax,DWORD PTR [r12+0x4]
0x0000000101096195 <SDL_DisplayYUV_SW+581>: mov rsi,QWORD PTR [r14+0x20]
0x0000000101096199 <SDL_DisplayYUV_SW+585>: mov rdi,QWORD PTR [r14+0x18]
0x000000010109619d <SDL_DisplayYUV_SW+589>: sub ecx,eax
0x000000010109619f <SDL_DisplayYUV_SW+591>: mov DWORD PTR [rsp+0x10],ecx
0x00000001010961a3 <SDL_DisplayYUV_SW+595>: mov DWORD PTR [rsp+0x8],eax
0x00000001010961a7 <SDL_DisplayYUV_SW+599>: mov eax,DWORD PTR [r12+0x8]
0x00000001010961ac <SDL_DisplayYUV_SW+604>: mov DWORD PTR [rsp],eax
0x00000001010961af <SDL_DisplayYUV_SW+607>: mov r8,r15
0x00000001010961b2 <SDL_DisplayYUV_SW+610>: mov rcx,r10
0x00000001010961b5 <SDL_DisplayYUV_SW+613>: mov rdx,r13
0x00000001010961b8 <SDL_DisplayYUV_SW+616>: call QWORD PTR [r14+0x28]
0x00000001010961bc <SDL_DisplayYUV_SW+620>: jmp 0x1010960ca <SDL_DisplayYUV_SW+378>
0x00000001010961c1 <SDL_DisplayYUV_SW+625>: nop DWORD PTR [rax+0x0]
0x00000001010961c8 <SDL_DisplayYUV_SW+632>: nop DWORD PTR [rax+rax+0x0]
0x00000001010961d0 <SDL_DisplayYUV_SW+640>: mov rax,QWORD PTR [rbx+0x8]
0x00000001010961d4 <SDL_DisplayYUV_SW+644>: movzx ecx,BYTE PTR [rax+0x9]
0x00000001010961d8 <SDL_DisplayYUV_SW+648>: movzx esi,WORD PTR [rbx+0x18]
0x00000001010961dc <SDL_DisplayYUV_SW+652>: mov rdi,QWORD PTR [rbp-0x48]
0x00000001010961e0 <SDL_DisplayYUV_SW+656>: movsx edx,WORD PTR [rdi]
0x00000001010961e3 <SDL_DisplayYUV_SW+659>: imul edx,ecx
0x00000001010961e6 <SDL_DisplayYUV_SW+662>: movsxd rdx,edx
0x00000001010961e9 <SDL_DisplayYUV_SW+665>: add rdx,QWORD PTR [rbx+0x20]
0x00000001010961ed <SDL_DisplayYUV_SW+669>: movsx eax,WORD PTR [rdi+0x2]
0x00000001010961f1 <SDL_DisplayYUV_SW+673>: imul eax,esi
0x00000001010961f4 <SDL_DisplayYUV_SW+676>: cdqe
0x00000001010961f6 <SDL_DisplayYUV_SW+678>: lea r9,[rdx+rax]
0x00000001010961fa <SDL_DisplayYUV_SW+682>: jmp 0x101096085 <SDL_DisplayYUV_SW+309>
0x00000001010961ff <SDL_DisplayYUV_SW+687>: nop
0x0000000101096200 <SDL_DisplayYUV_SW+688>: mov rbx,QWORD PTR [r14+0x8]
0x0000000101096204 <SDL_DisplayYUV_SW+692>: mov rcx,QWORD PTR [rbp-0x48]
0x0000000101096208 <SDL_DisplayYUV_SW+696>: mov rdx,rbx
0x000000010109620b <SDL_DisplayYUV_SW+699>: mov rsi,QWORD PTR [rbp-0x40]
0x000000010109620f <SDL_DisplayYUV_SW+703>: mov rdi,QWORD PTR [r14]
0x0000000101096212 <SDL_DisplayYUV_SW+706>: call 0x10108f430 <SDL_SoftStretch>
0x0000000101096217 <SDL_DisplayYUV_SW+711>: jmp 0x1010960ee <SDL_DisplayYUV_SW+414>
0x000000010109621c <SDL_DisplayYUV_SW+716>: nop DWORD PTR [rax+0x0]
0x0000000101096220 <SDL_DisplayYUV_SW+720>: mov rax,QWORD PTR [r12+0x18]
0x0000000101096225 <SDL_DisplayYUV_SW+725>: mov r13,QWORD PTR [rax]
0x0000000101096228 <SDL_DisplayYUV_SW+728>: lea r10,[r13+0x1]
0x000000010109622c <SDL_DisplayYUV_SW+732>: lea r15,[r13+0x3]
0x0000000101096230 <SDL_DisplayYUV_SW+736>: jmp 0x101096040 <SDL_DisplayYUV_SW+240>
0x0000000101096235 <SDL_DisplayYUV_SW+741>: nop DWORD PTR [rax+rax+0x0]
0x000000010109623a <SDL_DisplayYUV_SW+746>: nop WORD PTR [rax+rax+0x0]
0x0000000101096240 <SDL_DisplayYUV_SW+752>: mov rax,QWORD PTR [r12+0x18]
0x0000000101096245 <SDL_DisplayYUV_SW+757>: mov r13,QWORD PTR [rax]
0x0000000101096248 <SDL_DisplayYUV_SW+760>: mov r10,QWORD PTR [rax+0x10]
0x000000010109624c <SDL_DisplayYUV_SW+764>: mov r15,QWORD PTR [rax+0x8]
0x0000000101096250 <SDL_DisplayYUV_SW+768>: jmp 0x101096040 <SDL_DisplayYUV_SW+240>
0x0000000101096255 <SDL_DisplayYUV_SW+773>: nop DWORD PTR [rax+rax+0x0]
0x000000010109625a <SDL_DisplayYUV_SW+778>: nop WORD PTR [rax+rax+0x0]
0x0000000101096260 <SDL_DisplayYUV_SW+784>: mov rax,QWORD PTR [r12+0x18]
0x0000000101096265 <SDL_DisplayYUV_SW+789>: mov r13,QWORD PTR [rax]
0x0000000101096268 <SDL_DisplayYUV_SW+792>: mov r10,QWORD PTR [rax+0x8]
0x000000010109626c <SDL_DisplayYUV_SW+796>: mov r15,QWORD PTR [rax+0x10]
0x0000000101096270 <SDL_DisplayYUV_SW+800>: jmp 0x101096040 <SDL_DisplayYUV_SW+240>
0x0000000101096275 <SDL_DisplayYUV_SW+805>: mov DWORD PTR [rbp-0x34],0x0
0x000000010109627c <SDL_DisplayYUV_SW+812>: cmp si,WORD PTR [rbx+0x6]
0x0000000101096280 <SDL_DisplayYUV_SW+816>: jne 0x101096143 <SDL_DisplayYUV_SW+499>
0x0000000101096286 <SDL_DisplayYUV_SW+822>: mov rbx,QWORD PTR [r14+0x8]
0x000000010109628a <SDL_DisplayYUV_SW+826>: mov DWORD PTR [rbp-0x38],0x0
0x0000000101096291 <SDL_DisplayYUV_SW+833>: jmp 0x101095faa <SDL_DisplayYUV_SW+90>
0x0000000101096296 <SDL_DisplayYUV_SW+838>: mov rax,QWORD PTR [r14+0x8]
0x000000010109629a <SDL_DisplayYUV_SW+842>: mov rax,QWORD PTR [rax+0x8]
0x000000010109629e <SDL_DisplayYUV_SW+846>: mov r9d,DWORD PTR [rax+0x18]
0x00000001010962a2 <SDL_DisplayYUV_SW+850>: mov r8d,DWORD PTR [rax+0x14]
0x00000001010962a6 <SDL_DisplayYUV_SW+854>: movzx ecx,BYTE PTR [rax+0x8]
0x00000001010962aa <SDL_DisplayYUV_SW+858>: mov edx,DWORD PTR [r12+0x8]
0x00000001010962af <SDL_DisplayYUV_SW+863>: mov esi,DWORD PTR [r12+0x4]
0x00000001010962b4 <SDL_DisplayYUV_SW+868>: mov DWORD PTR [rsp+0x8],0x0
0x00000001010962bc <SDL_DisplayYUV_SW+876>: mov eax,DWORD PTR [rax+0x1c]
0x00000001010962bf <SDL_DisplayYUV_SW+879>: mov DWORD PTR [rsp],eax
0x00000001010962c2 <SDL_DisplayYUV_SW+882>: xor edi,edi
0x00000001010962c4 <SDL_DisplayYUV_SW+884>: call 0x101090630 <SDL_CreateRGBSurface>
0x00000001010962c9 <SDL_DisplayYUV_SW+889>: mov rbx,rax
0x00000001010962cc <SDL_DisplayYUV_SW+892>: mov QWORD PTR [r14],rax
0x00000001010962cf <SDL_DisplayYUV_SW+895>: test rax,rax
0x00000001010962d2 <SDL_DisplayYUV_SW+898>: jne 0x101095f9c <SDL_DisplayYUV_SW+76>
0x00000001010962d8 <SDL_DisplayYUV_SW+904>: mov eax,0xffffffff
0x00000001010962dd <SDL_DisplayYUV_SW+909>: jmp 0x101095ff0 <SDL_DisplayYUV_SW+160>
0x00000001010962e2 <SDL_DisplayYUV_SW+914>: nop DWORD PTR [rax+0x0]
0x00000001010962e9 <SDL_DisplayYUV_SW+921>: nop DWORD PTR [rax+0x0]
End of assembler dump.

gdb$ info all-registers
rax 0x5 0x5
rbx 0x0 0x0
rcx 0x500 0x500
rdx 0x1e0 0x1e0
rsi 0x2d0 0x2d0
rdi 0x2d0 0x2d0
rbp 0x7fff5fbfe6f0 0x7fff5fbfe6f0
rsp 0x7fff5fbfe670 0x7fff5fbfe670
r8 0x10e 0x10e
r9 0x2d0 0x2d0
r10 0x102610ed0 0x102610ed0
r11 0x0 0x0
r12 0x1023371e0 0x1023371e0
r13 0x1023371e0 0x1023371e0
r14 0x102339fd0 0x102339fd0
r15 0x102801e00 0x102801e00
rip 0x10109629e 0x10109629e <SDL_DisplayYUV_SW+846>
eflags 0x10246 0x10246
cs 0x27 0x27
ss 0x0 0x0
ds 0x0 0x0
es 0x0 0x0
fs 0x10 0x10
gs 0x48 0x48
st0 <invalid float value> (raw 0xffff0000000000000000)
st1 -nan(0x000020100) (raw 0xffff0000000000020100)
st2 0 (raw 0x00000000000000000000)
st3 -1 (raw 0xbfff8000000000000000)
st4 0.99609375020658375010640384061844088 (raw 0x3ffeff000000e3242800)
st5 -0.0039062497934162498935961593815591186 (raw 0xbff6ffffff1cdbd80000)
st6 29448817133876 (raw 0x402bd644b24649a00000)
st7 29448.817133876000298187136650085449 (raw 0x400de611a25f5f13c000)
fctrl 0x37f 0x37f
fstat 0x20 0x20
ftag 0xffff 0xffff
fiseg 0x27 0x27
fioff 0x838d1bf0 0x838d1bf0
foseg 0x1f 0x1f
fooff 0x5fbfe048 0x5fbfe048
fop 0x55d 0x55d
xmm0 {

v4_float = {0, 0, 0, 0},
v2_double = {0, 0},
v16_int8 = {0 <repeats 16 times>},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x0, 0x0},
v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000

} (raw 0x00000000000000000000000000000000)
xmm1 {

v4_float = {0, -1.70141183e+38, 0, 0},
v2_double = {2.1137067449068142e-314, 0},
v16_int8 = {0, 0, 0, 0, -1, 0 <repeats 11 times>},
v8_int16 = {0x0, 0x0, 0xff00, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0xff000000, 0x0, 0x0},
v2_int64 = {0xff000000, 0x0},
uint128 = 0x0000000000000000000000ff00000000

} (raw 0x0000000000000000000000ff00000000)
xmm2 {

v4_float = {0, 0, 2.34180515e-38, 0},
v2_double = {0, 7.0632744564452601e-304},
v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0xff0000, 0x0},
v2_int64 = {0x0, 0xff000000000000},
uint128 = 0x000000000000ff000000000000000000

} (raw 0x000000000000ff000000000000000000)
xmm3 {

v4_float = {6.70101363e-10, 0.000942709623, 2.56399169e-09, 2.74521517e-06},
v2_double = {2.089612841847915e-76, 9.1667074908724307e-72},
v16_int8 = {48, 56, 50, 49, 58, 119, 32, 44, 49, 48, 50, 56, 54, 56, 58, 112},
v8_int16 = {0x3038, 0x3231, 0x3a77, 0x202c, 0x3130, 0x3238, 0x3638, 0x3a70},
v4_int32 = {0x30383231, 0x3a77202c, 0x31303238, 0x36383a70},
v2_int64 = {0x303832313a77202c, 0x3130323836383a70},
uint128 = 0x703a3836383230312c20773a31323830

} (raw 0x703a3836383230312c20773a31323830)
xmm4 {

v4_float = {0, 0, 0, 0},
v2_double = {0, 0},
v16_int8 = {0 <repeats 16 times>},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x0, 0x0},
v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000

} (raw 0x00000000000000000000000000000000)
xmm5 {

v4_float = {0, 0, 2.71875, 0},
v2_double = {0, 15},
v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 64, 46, 0, 0, 0, 0, 0, 0},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x402e, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x402e0000, 0x0},
v2_int64 = {0x0, 0x402e000000000000},
uint128 = 0x0000000000002e400000000000000000

} (raw 0x0000000000002e400000000000000000)
xmm6 {

v4_float = {0, 0, 0, 0},
v2_double = {0, 0},
v16_int8 = {0 <repeats 16 times>},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x0, 0x0},
v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000

} (raw 0x00000000000000000000000000000000)
xmm7 {

v4_float = {0, 0, 1.875, 0},
v2_double = {0, 1},
v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 63, -16, 0, 0, 0, 0, 0, 0},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x3ff0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x3ff00000, 0x0},
v2_int64 = {0x0, 0x3ff0000000000000},
uint128 = 0x000000000000f03f0000000000000000

} (raw 0x000000000000f03f0000000000000000)
xmm8 {

v4_float = {0, 0, 1.875, 0},
v2_double = {0, 1},
v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 63, -16, 0, 0, 0, 0, 0, 0},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x3ff0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x3ff00000, 0x0},
v2_int64 = {0x0, 0x3ff0000000000000},
uint128 = 0x000000000000f03f0000000000000000

} (raw 0x000000000000f03f0000000000000000)
xmm9 {

v4_float = {0, 0, 1.875, 0},
v2_double = {0, 1},
v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 63, -16, 0, 0, 0, 0, 0, 0},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x3ff0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x3ff00000, 0x0},
v2_int64 = {0x0, 0x3ff0000000000000},
uint128 = 0x000000000000f03f0000000000000000

} (raw 0x000000000000f03f0000000000000000)
xmm10 {

v4_float = {0, 0, 1.875, 0},
v2_double = {0, 1},
v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 63, -16, 0, 0, 0, 0, 0, 0},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x3ff0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x3ff00000, 0x0},
v2_int64 = {0x0, 0x3ff0000000000000},
uint128 = 0x000000000000f03f0000000000000000

} (raw 0x000000000000f03f0000000000000000)
xmm11 {

v4_float = {0, 0, 30, 0},
v2_double = {0, 4294967296},
v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 65, -16, 0, 0, 0, 0, 0, 0},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x41f0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x41f00000, 0x0},
v2_int64 = {0x0, 0x41f0000000000000},
uint128 = 0x000000000000f0410000000000000000

} (raw 0x000000000000f0410000000000000000)
xmm12 {

v4_float = {0, 0, 0, 0},
v2_double = {0, 0},
v16_int8 = {0 <repeats 16 times>},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x0, 0x0},
v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000

} (raw 0x00000000000000000000000000000000)
xmm13 {

v4_float = {0, 0, 1.875, 0},
v2_double = {0, 1},
v16_int8 = {0, 0, 0, 0, 0, 0, 0, 0, 63, -16, 0, 0, 0, 0, 0, 0},
v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x3ff0, 0x0, 0x0, 0x0},
v4_int32 = {0x0, 0x0, 0x3ff00000, 0x0},
v2_int64 = {0x0, 0x3ff0000000000000},
uint128 = 0x000000000000f03f0000000000000000

} (raw 0x000000000000f03f0000000000000000)
xmm14 {

v4_float = {1.1479437e-41, 1.1479437e-41, 1.1479437e-41, 1.1479437e-41},
v2_double = {1.7383389523634897e-310, 1.7383389523634897e-310},
v16_int8 = {0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 32, 0},
v8_int16 = {0x0, 0x2000, 0x0, 0x2000, 0x0, 0x2000, 0x0, 0x2000},
v4_int32 = {0x2000, 0x2000, 0x2000, 0x2000},
v2_int64 = {0x200000002000, 0x200000002000},
uint128 = 0x00200000002000000020000000200000

} (raw 0x00200000002000000020000000200000)
xmm15 {

v4_float = {2.84239941e-39, 5.66172224e-39, 5.66172224e-39, 5.66172224e-39},
v2_double = {4.3042647523733154e-308, 1.6493747036201675e-307},
v16_int8 = {0, 30, -13, 116, 0, 61, -90, -108, 0, 61, -90, -108, 0, 61, -90, -108},
v8_int16 = {0x1e, 0xf374, 0x3d, 0xa694, 0x3d, 0xa694, 0x3d, 0xa694},
v4_int32 = {0x1ef374, 0x3da694, 0x3da694, 0x3da694},
v2_int64 = {0x1ef374003da694, 0x3da694003da694},
uint128 = 0x94a63d0094a63d0094a63d0074f31e00

} (raw 0x94a63d0094a63d0094a63d0074f31e00)
mxcsr 0x1fa2 0x1fa2

Change History (7)

comment:1 by Carl Eugen Hoyos, 12 years ago

Could you test mplayer -vo sdl ?

comment:2 by cbsrobot, 12 years ago

mplayer -vo sdl works, but when resizing it stretches the movie to the window size. in fullscreen mode, the movie has the correct aspect ratio.

MPlayer SVN-r34188-4.2.1 (C) 2000-2011 MPlayer Team

Playing ~/Desktop/10s_1280x720_baseline.mov.
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
VIDEO: [H264] 1280x720 24bpp 25.000 fps 1099.5 kbps (134.2 kbyte/s)
Clip info:

major_brand: qt
minor_version: 512
compatible_brands: qt
creation_time: 1970-01-01 00:00:00
encoder: Lavf52.92.0

Load subtitles in ~/Desktop/
[VO_SDL] Using driver: Quartz.
Xlib: extension "XFree86-VidModeExtension" missing on display "/tmp/launch-U0DWuG/org.x:0".
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [sdl] 1280x720 => 1280x720 Planar YV12
V: 5.2 0/ 0 18% 18% 0.0% 0 0

comment:3 by cbsrobot, 12 years ago

I found a solution for this issue (see below), but there is another issue left: http://forums.libsdl.org/viewtopic.php?t=6768&sid=ebc8e29fdcde2a301c0e7c723dca2696

is there a nice workaround for this problem ?

diff --git a/ffplay.c b/ffplay.c
index 46eff5c..a50d98e 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -940,12 +940,7 @@ static int video_open(VideoState *is){
        && is->height== screen->h && screen->h == h)
         return 0;
 
-#ifndef __APPLE__
     screen = SDL_SetVideoMode(w, h, 0, flags);
-#else
-    /* setting bits_per_pixel = 0 or 32 causes blank video on OS X */
-    screen = SDL_SetVideoMode(w, h, 24, flags);
-#endif
     if (!screen) {
         fprintf(stderr, "SDL: could not set video mode - exiting\n");
         do_exit(is);

comment:4 by Carl Eugen Hoyos, 12 years ago

Reproduced by developer: set
Status: newopen

I can reproduce the original crash on "f" on PowerPC OS X 10.5

Could you confirm that your patch completely fixes the problem for you?
With it, I get correct colours (instead of wrong colours for many samples with current git head), but on exit, SDL_FreeYUVOverlay() triggers a double free and resizing still does not work (but does not crash).

comment:5 by Carl Eugen Hoyos, 12 years ago

Keywords: sdl added

Original thread that lead to this problem:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/32403

comment:6 by cbsrobot, 12 years ago

Yes it fixes the issue for me and I do not see the double free as you mention.

patch http://ffmpeg.org/pipermail/ffmpeg-devel/2011-October/115760.html

I will open a new ticket for the remaining issue.

comment:7 by Carl Eugen Hoyos, 12 years ago

Resolution: fixed
Status: openclosed

Your patch has been applied.

Note: See TracTickets for help on using tickets.