fix for issue 150 ; mp4v2 incorrectly reports track bitrate in the absence of the
avgBitrate track property. thanks to ktakata65536 for the patch.
if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
MP4File *pFile = (MP4File *)hFile;
try {
- return pFile->GetTrackIntegerProperty(trackId,
+ uint32_t bitrate = pFile->GetTrackIntegerProperty(trackId,
"mdia.minf.stbl.stsd.*.esds.decConfigDescr.avgBitrate");
+ if(bitrate != 0) {
+ return bitrate;
+ }
}
catch( Exception* x ) {
//mp4v2::impl::log.errorf(*x); we don't really need to print this.