revert some structure changes

This commit is contained in:
Isaac Connor 2016-04-01 14:15:31 -04:00
parent 86c888d079
commit f4fc129ecf
1 changed files with 5 additions and 3 deletions

View File

@ -157,7 +157,8 @@ int FfmpegCamera::Capture( Image &image )
while ( !frameComplete )
{
int avResult = av_read_frame( mFormatContext, &packet );
if ( avResult < 0 ) {
if ( avResult < 0 )
{
char errbuf[AV_ERROR_MAX_STRING_SIZE];
av_strerror(avResult, errbuf, AV_ERROR_MAX_STRING_SIZE);
if (
@ -165,7 +166,8 @@ int FfmpegCamera::Capture( Image &image )
(avResult == AVERROR_EOF || (mFormatContext->pb && mFormatContext->pb->eof_reached)) ||
// Check for Connection failure.
(avResult == -110)
) {
)
{
Info( "av_read_frame returned \"%s\". Reopening stream.", errbuf );
ReopenFfmpeg();
}