codec not ready is not an error. Make it a debug

pull/2736/head
Isaac Connor 2019-09-15 18:01:38 -04:00
parent 63db128edf
commit 6925a75831
1 changed files with 8 additions and 2 deletions

View File

@ -547,8 +547,14 @@ int zm_send_packet_receive_frame(
}
if ( (ret = avcodec_receive_frame(context, frame)) < 0 ) {
Error("Unable to send packet %s, continuing",
av_make_error_string(ret).c_str());
if ( AVERROR(EAGAIN) == ret ) {
// The codec may need more samples than it has, perfectly valid
Debug(2, "Codec not ready to give us a frame");
return 0;
} else {
Error("Could not recieve frame (error %d = '%s')", ret,
av_make_error_string(ret).c_str());
}
return ret;
}
# else