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 );
|
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;
|
int keyframe = packet.flags & AV_PKT_FLAG_KEY;
|
||||||
|
@ -710,12 +710,16 @@ int FfmpegCamera::CaptureAndRecord( Image &image, timeval recording, char* event
|
||||||
// Check for Connection failure.
|
// Check for Connection failure.
|
||||||
(ret == -110)
|
(ret == -110)
|
||||||
) {
|
) {
|
||||||
Info( "av_read_frame returned \"%s\". Reopening stream.", errbuf);
|
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 );
|
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;
|
int keyframe = packet.flags & AV_PKT_FLAG_KEY;
|
||||||
|
|
Loading…
Reference in New Issue