Fix FFmpeg handling odd WMA files, at least

This small change brings the decoding more in line with what ffplay
does, and allows, for example, John McLaughlin.wma to play without
interruption from the stream warnings throughout the file.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-02-20 03:14:10 -08:00
parent b995030aec
commit 90ed02302e
1 changed files with 1 additions and 7 deletions

View File

@ -694,14 +694,8 @@ static uint8_t reverse_bits[0x100];
if(!rawDSD) {
if((errcode = avcodec_send_packet(codecCtx, endOfStream ? NULL : lastReadPacket)) < 0) {
if(errcode == AVERROR_INVALIDDATA) {
ALog(@"Sync error sending packet to codec, attempting to skip it");
if(errcode == AVERROR(EAGAIN)) {
continue;
} else if(errcode != AVERROR(EAGAIN)) {
char errDescr[4096];
av_strerror(errcode, errDescr, 4096);
ALog(@"Error sending packet to codec, errcode = %d, error = %s", errcode, errDescr);
return 0;
}
}
}