add some comments

This commit is contained in:
Isaac Connor 2016-04-04 21:58:16 -04:00
parent a60a0959fc
commit be13e56c3c
2 changed files with 4 additions and 0 deletions

View File

@ -486,6 +486,7 @@ int RemoteCameraRtsp::CaptureAndRecord( Image &image, bool recording, char* even
}
#if HAVE_LIBSWSCALE
// Why are we re-scaling after writing out the packet?
if(mConvertContext == NULL) {
mConvertContext = sws_getContext( mCodecContext->width, mCodecContext->height, mCodecContext->pix_fmt, width, height, imagePixFormat, SWS_BICUBIC, NULL, NULL, NULL );

View File

@ -325,6 +325,9 @@ bool RtpSource::handlePacket( const unsigned char *packet, size_t packetLen )
mFrameReady.updateValueSignal( true );
if ( !mFrameProcessed.getValueImmediate() )
{
// What is the point of this for loop? Is it just me, or will it call getUpdatedValue once or twice? Could it not be better written as
// if ( ! mFrameProcessed.getUpdatedValue( 1 ) && mFrameProcessed.getUpdatedValue( 1 ) ) return false;
for ( int count = 0; !mFrameProcessed.getUpdatedValue( 1 ); count++ )
if( count > 1 )
return( false );