Read after AVERROR_INVALIDDATA in video sound.

Partially reverse c1c3e4af5b that stopped on error in such cases.
This commit is contained in:
John Preston 2017-05-26 17:18:58 +03:00
parent e24b0559d3
commit 6148b78745
1 changed files with 3 additions and 3 deletions

View File

@ -157,9 +157,9 @@ AudioPlayerLoader::ReadResult ChildFFMpegLoader::readMore(QByteArray &result, in
LOG(("Audio Error: Unable to avcodec_send_packet() file '%1', data size '%2', error %3, %4").arg(_file.name()).arg(_data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res)));
// There is a sample voice message where skipping such packet
// results in a crash (read_access to nullptr) in swr_convert().
//if (res == AVERROR_INVALIDDATA) {
// return ReadResult::NotYet; // try to skip bad packet
//}
if (res == AVERROR_INVALIDDATA) {
return ReadResult::NotYet; // try to skip bad packet
}
return ReadResult::Error;
}
FFMpeg::freePacket(&packet);