yixia / Vitamio-iOS

Vitamio for iOS
http://www.vitamio.org/en/
451 stars 176 forks source link

Cannot cancel prepareAsync #4

Closed vminc closed 11 years ago

vminc commented 11 years ago

When prepareAsync is called and before the video is prepared, there is no way to cancel the preparing operation. It would be nice if there is a way to cancel it, for example to load another video.

EchoLiao commented 11 years ago

No, it can! just call -reset method.

vminc commented 11 years ago

The app will crash if I call reset while the video is preparing..

EchoLiao commented 11 years ago

crash ? Pls attach a screenshot. may be your mean is it receive a kill signal SIGUSR2, it is normal. you can test again by unlink Xcode.

vminc commented 11 years ago

Hi,

Here's a crashlog: testProject-[VMediaPlayer reset]: 0x5f7390: pushl %ebp 0x5f7391: movl %esp, %ebp 0x5f7393: pushl %ebx 0x5f7394: pushl %edi 0x5f7395: pushl %esi 0x5f7396: subl $28, %esp 0x5f7399: calll 0x5f739e ; -[VMediaPlayer reset] + 14 0x5f739e: popl %esi 0x5f739f: movl 8(%ebp), %edi 0x5f73a2: movl 3450694(%esi), %eax 0x5f73a8: cmpb $0, (%edi,%eax) 0x5f73ac: je 0x5f73e5 ; -[VMediaPlayer reset] + 85 0x5f73ae: movl 3450698(%esi), %ebx 0x5f73b4: movzwl (%edi,%ebx), %eax 0x5f73b8: testw $33276, %ax 0x5f73bc: je 0x5f741a ; -[VMediaPlayer reset] + 138 0x5f73be: movl 3450702(%esi), %eax 0x5f73c4: movl (%edi,%eax), %eax 0x5f73c7: movl 3260238(%esi), %ecx 0x5f73cd: movl %ecx, 4(%esp) 0x5f73d1: movl %eax, (%esp) 0x5f73d4: calll 0x623d74 ; symbol stub for: objc_msgSend 0x5f73d9: movl $2, (%edi,%ebx) 0x5f73e0: jmp 0x5f7516 ; -[VMediaPlayer reset] + 390 0x5f73e5: leal 695947(%esi), %eax 0x5f73eb: movl %eax, 8(%esp) 0x5f73ef: leal 695273(%esi), %eax 0x5f73f5: movl %eax, 4(%esp) 0x5f73f9: leal 695253(%esi), %eax 0x5f73ff: movl %eax, (%esp) 0x5f7402: movl $289, 12(%esp) 0x5f740a: calll 0x624230 ; symbol stub for: printf 0x5f740f: leal 695487(%esi), %eax 0x5f7415: jmp 0x5f7502 ; -[VMediaPlayer reset] + 370

vminc commented 11 years ago

The crash occurs on both simulator and device. We use v.1.1.0.

EchoLiao commented 11 years ago

are you test it by unlink device form Xcode?

vminc commented 11 years ago

Thanks, I unlink xCode and problem no longer happens.