[codec,dsp] fix unreachable code

This commit is contained in:
akallabeth 2024-10-15 23:48:58 +02:00
parent 0f8a6392d1
commit e3430eeff5
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
1 changed files with 4 additions and 3 deletions

View File

@ -477,13 +477,14 @@ static BOOL ffmpeg_encode_frame(AVCodecContext* WINPR_RESTRICT context, AVFrame*
}
/* read all the output frames (in general there may be any number of them */
while (ret >= 0)
while (TRUE)
{
ret = avcodec_receive_packet(context, packet);
if ((ret == AVERROR(EAGAIN)) || (ret == AVERROR_EOF))
return TRUE;
else if (ret < 0)
break;
if (ret < 0)
{
const char* err = av_err2str(ret);
WLog_ERR(TAG, "Error during encoding %s [%d]", err, ret);