return true;
exception:
- if (privateData) {
- mmfile_close(privateData->hFile);
- mmfile_free(privateData);
- *handle = NULL;
- }
+ mmfile_close(privateData->hFile);
+ mmfile_free(privateData);
+ *handle = NULL;
return false;
}
formatContext->audioTotalTrackNum += 1;
pAudioCodecCtx = pFormatCtx->streams[i]->codecpar;
- if (pAudioCodecCtx) {
- audioStream->codecId = __convert_audio_codec_type(pAudioCodecCtx->codec_id);
- audioStream->bitRate = pAudioCodecCtx->bit_rate;
- audioStream->nbChannel = pAudioCodecCtx->ch_layout.nb_channels;
- audioStream->samplePerSec = pAudioCodecCtx->sample_rate;
- audioStream->bitPerSample = pAudioCodecCtx->bits_per_coded_sample;
- audioStream->is_uhqa = __check_uhqa(audioStream->samplePerSec, pFormatCtx->streams[i]->codecpar->format);
- }
+ audioStream->codecId = __convert_audio_codec_type(pAudioCodecCtx->codec_id);
+ audioStream->bitRate = pAudioCodecCtx->bit_rate;
+ audioStream->nbChannel = pAudioCodecCtx->ch_layout.nb_channels;
+ audioStream->samplePerSec = pAudioCodecCtx->sample_rate;
+ audioStream->bitPerSample = pAudioCodecCtx->bits_per_coded_sample;
+ audioStream->is_uhqa = __check_uhqa(audioStream->samplePerSec, pFormatCtx->streams[i]->codecpar->format);
}
}
#endif
debug_msg(RELEASE, "frame : %p", *frame);
- if (pFrame)
- av_frame_free(&pFrame);
- if (pVideoCodecCtx)
- avcodec_free_context(&pVideoCodecCtx);
+ av_frame_free(&pFrame);
+ avcodec_free_context(&pVideoCodecCtx);
return MMFILE_FORMAT_SUCCESS;
if (pFrame)
av_frame_free(&pFrame);
- if (pVideoCodecCtx)
- avcodec_free_context(&pVideoCodecCtx);
+ avcodec_free_context(&pVideoCodecCtx);
return ret;
}
Name: libmm-fileinfo
Summary: Media Fileinfo
-Version: 1.0.19
+Version: 1.0.20
Release: 0
Group: System/Libraries
License: Apache-2.0
return MMFILE_UTIL_SUCCESS;
exception:
- if (mmapHandle) {
- if (mmapHandle->ptr) {
- munmap(mmapHandle->ptr, mmapHandle->size);
- }
-
- if (mmapHandle->fd > 2) {
- close(mmapHandle->fd);
- }
+ if (mmapHandle->ptr) {
+ munmap(mmapHandle->ptr, mmapHandle->size);
+ }
- mmfile_free(mmapHandle);
- handle->privateData = NULL;
+ if (mmapHandle->fd > 2) {
+ close(mmapHandle->fd);
}
+ mmfile_free(mmapHandle);
+ handle->privateData = NULL;
+
return MMFILE_UTIL_FAIL;
}