catch another EOF case
This commit is contained in:
parent
6883350e47
commit
9caa71233a
|
@ -207,7 +207,7 @@ int FfmpegCamera::Capture( Image &image ) {
|
|||
}
|
||||
|
||||
Error( "Unable to read packet from stream %d: error %d \"%s\".", packet.stream_index, avResult, errbuf );
|
||||
return( -1 );
|
||||
return -1;
|
||||
}
|
||||
|
||||
int keyframe = packet.flags & AV_PKT_FLAG_KEY;
|
||||
|
@ -711,11 +711,15 @@ int FfmpegCamera::CaptureAndRecord( Image &image, timeval recording, char* event
|
|||
(ret == -110)
|
||||
) {
|
||||
Info( "av_read_frame returned \"%s\". Reopening stream.", errbuf);
|
||||
ReopenFfmpeg();
|
||||
if ( ReopenFfmpeg() < 0 ) {
|
||||
// OpenFfmpeg will do enough logging.
|
||||
return -1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Error( "Unable to read packet from stream %d: error %d \"%s\".", packet.stream_index, ret, errbuf );
|
||||
return( -1 );
|
||||
return -1;
|
||||
}
|
||||
|
||||
int keyframe = packet.flags & AV_PKT_FLAG_KEY;
|
||||
|
|
Loading…
Reference in New Issue