Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS9.x 切换后台, 进入前台, 画面暂停,有声音,日志recovery error!!!! #873

Open
Singsmlie opened this issue Jan 25, 2016 · 13 comments
Assignees
Labels

Comments

@Singsmlie
Copy link

环境:m3u8 的源地址 http://v.baoliao.topv.yunfan.com/video/t01b5f5063e8284f474.m3u8
今天测试了一下 7.1.2 7.2 的手机没有此问题,
9.x 的手机,必现 日志log
after scale width 480 height 480
recovery error!!!!

跟踪了一下 应该是 IJKVideoToolBox.m -> CreateVTBSession -> videotoolbox_decode_video
请问下什么情况这种 recovery error!!!! 会出现,难道9.x 系统改变的策略,
这个与服务器的配置有关系吗。
谢谢

@Singsmlie
Copy link
Author

9.2 模拟器没有此问题,在真机上必现

@Singsmlie
Copy link
Author

跟踪播放时 画面卡住
decode callback -12909 kVTVideoDecoderBadDataErr
decodeFrame -12911 kVTVideoDecoderMalfunctionErr

@bbcallen bbcallen added the bug label Jan 25, 2016
@bbcallen
Copy link
Contributor

I'll take a look. But I don't think it could be fixed soon.

@Singsmlie
Copy link
Author

ok thanks

@yeshibuzhong
Copy link

请问楼主问题解决了吗 我也碰到了同样的问题

@iqluoji
Copy link

iqluoji commented Jul 27, 2016

解决问题了么 我也遇到了这个问题 模拟器上seek没问题 真机上seek不到画面 声音有

@yeshibuzhong
Copy link

我是在 IJKVideoToolBox.m static int decode_video(VideoToolBoxContext* context, AVCodecContext avctx, AVPacket *avpkt, int got_picture_ptr)

添加了这一句
context->idr_based_identified = false

就没问题了

@SmallWeed
Copy link

lt's work for me, 楼上正解 在decode_video函数里面 加一句context->idr_based_identified = false 就可以继续播放了

@Singsmlie
Copy link
Author

it‘s done!!!
我之前跟踪的使用修改了这里 注释掉其中的一个判断 if ((context->m_buffer_deep > 0) /* &&
ff_avpacket_i_or_idr(&context->m_buffer_packet[0], context->idr_based_identified) == true */)
具体啥原因呢?

@xinzhengzhang
Copy link
Member

@Singsmlie
In this case, there is a videotoolbox decode failure when the app enter foreground.
ijk will try to recovery pictures until next idr frame. But it seems that there hasn't excepted frame in this stream.

Turn off idr_based_identified is just a workaround for these weird video.
For some video may be it will bring a blurred screen.

@Antinust
Copy link

Antinust commented Apr 9, 2020

@yeshibuzhong 能说一下这么修改的原因么

我是在 IJKVideoToolBox.m static int decode_video(VideoToolBoxContext* context, AVCodecContext avctx, AVPacket *avpkt, int got_picture_ptr)

添加了这一句
context->idr_based_identified = false

就没问题了

@ZYiDa
Copy link

ZYiDa commented Apr 26, 2020

我说一下我的解决办法:按照 @Singsmlie 说的,在IJKVideoToolBoxAsync.m和IJKVideoToolBoxSync.m中,分别注掉decode_video函数中的if ((context->m_buffer_deep > 0) /*&& ff_avpacket_i_or_idr(&context->m_buffer_packet[0], context->idr_based_identified) == true */) 判断语句中的*&& ff_avpacket_i_or_idr(&context->m_buffer_packet[0], context->idr_based_identified) == true */条件,两个文件中都要注释,不然可能会出现crash问题。

@mjx1003
Copy link

mjx1003 commented Jul 20, 2020

idr_based_identified在初始化时直接赋值为true,但是m3u8的ts里可能没有idr,所以我在DuplicatePkt修正了一下idr_based_identified:
在DuplicatePkt里加上
if (context->m_buffer_deep == 0) {
context->idr_based_identified = ff_avpacket_is_idr(pkt);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants