|
@@ -63,7 +63,7 @@ static int video_decode_frame(AVCodecContext *p_codec_ctx, packet_queue_t *p_pkt
|
|
|
else if (ret == AVERROR(EAGAIN))
|
|
|
{
|
|
|
//hostapi->Debug(MEDIA_LOG_DEBUG,"video avcodec_receive_frame(): output is not available in this state - " "user must try to send new input");
|
|
|
- //av_usleep(RVC_DEFAULT_SLEEP_TIME);
|
|
|
+ av_usleep(2);
|
|
|
break;
|
|
|
}
|
|
|
else
|
|
@@ -95,6 +95,8 @@ static int video_decode_frame(AVCodecContext *p_codec_ctx, packet_queue_t *p_pkt
|
|
|
// pkt.pos变量可以标识当前packet在视频文件中的地址偏移
|
|
|
int isend_ret = -1;
|
|
|
isend_ret = avcodec_send_packet(p_codec_ctx, &pkt);
|
|
|
+ av_usleep(2);
|
|
|
+ //hostapi->Debug(MEDIA_LOG_DEBUG, "%s:%d after avcodec_send_packet.", __FUNCTION__, __LINE__);
|
|
|
if (0 != isend_ret){
|
|
|
if (AVERROR(EAGAIN) == isend_ret) {
|
|
|
hostapi->Debug(MEDIA_LOG_DEBUG, "receive_frame and send_packet both returned EAGAIN, which is an API violation.");
|