{
if(!isEncoderReady){
FLOGE("processFrame - isEncoderReady is false.");
- return 0;
+ return -1;
}
int ret = 0;
int y_length = pWidth * pHeight;
int FfmpegHelper::close()
{
- if(vStream)
+ if(vStream){
avcodec_close(vStream->codec);
+ vStream = NULL;
+ }
+
if (formatCtx){
avio_close(formatCtx->pb);
avformat_free_context(formatCtx);
+ formatCtx = NULL;
}
FLOGE("<----------- FfmpegHelper::close ");
isEncoderReady = false;