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
parent
b995030aec
commit
90ed02302e
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue