SBVideoCaptureDemo icon indicating copy to clipboard operation
SBVideoCaptureDemo copied to clipboard

有时候在回删视频片段的时候出现crash

Open xhzengAIB opened this issue 10 years ago • 9 comments

下次再次出现的话,我把crash的截图发上来

xhzengAIB avatar Sep 13 '14 08:09 xhzengAIB

25933fa9-1da4-4d20-92f3-9140643e3d27

xhzengAIB avatar Sep 13 '14 08:09 xhzengAIB

具体操作流程如下: 1.点击主页button进入相机页面 2.轻点录制按钮,手指马上离开按钮和屏幕 3.这时候发现,进度条一直在动。 4.不要等待录制完成,在这中间,重复2的操作。 5.然后多次点击回删按钮,就crash了。

xhzengAIB avatar Sep 13 '14 08:09 xhzengAIB

好像确实存在这个问题:

applejian avatar Jan 23 '15 02:01 applejian

问题反馈: 1、在录制界面,有时候点击一下按钮,进度条就会一直向右增加。正常应该是按住才录制。 2、当分割的片段过多时,在iOS7 4S上就会crash。

lennondong avatar Jul 13 '15 01:07 lennondong

@xhzengAIB 这个问题,后来有解决吗?

iTA9178 avatar Aug 05 '15 02:08 iTA9178

没有

xhzengAIB avatar Aug 05 '15 07:08 xhzengAIB

我通过UILongPressGestureRecognizer 替换之前的touch,并且不使用下面两个方法:

  • (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
  • (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 而是通过下面方式:
  • (void)processGestureRecognizer:(UIGestureRecognizer *)gesture { if ([gesture isKindOfClass:[UILongPressGestureRecognizer class]]) { UILongPressGestureRecognizer *longPress = (UILongPressGestureRecognizer *)gesture; if (longPress.state == UIGestureRecognizerStateBegan) { NSString *filePath = [SBCaptureToolKit getVideoSaveFilePathString]; [_recorder startRecordingToOutputFileURL:[NSURL fileURLWithPath:filePath]]; }else if (longPress.state == UIGestureRecognizerStateEnded) { [_recorder stopCurrentVideoRecording]; } } } 去调用开始录制视频,得以解决。

iTA9178 avatar Aug 05 '15 15:08 iTA9178

录制过程中分割的片段过多时这种造成的crash目前还没遇到,但是有遇到分割片段过多mergeAndExportVideosAtFileURLs后,视频是黑的,无法播放。

iTA9178 avatar Aug 05 '15 15:08 iTA9178

已解决

applejian avatar Mar 03 '16 06:03 applejian