Cut down on "remaining data in packet" reports.

Looks potentially like a bug in FFmpeg.
This commit is contained in:
Unknown W. Brackets 2014-07-13 11:25:44 -07:00
parent 8dd783f719
commit 3fa1481fe9

View File

@ -628,8 +628,10 @@ u32 _AtracDecodeData(int atracID, u8* outbuf, u32 *SamplesNum, u32* finish, int
*remains = 0;
return ATRAC_ERROR_ALL_DATA_DECODED;
}
if (avret != packet.size) {
ERROR_LOG_REPORT_ONCE(multipacket, ME, "WARNING: Remaining data in packet - we currently only decode one frame/packet");
// FFmpeg seems to return packet.size / 10.
// However, advancing the packet by this causes decode errors. Bug?
if (avret != packet.size && avret != packet.size / 10) {
ERROR_LOG_REPORT_ONCE(multipacket, ME, "WARNING: Remaining data in packet - we currently only decode one frame per packet");
}
if (got_frame) {