Skip to content

Commit

Permalink
send packet only again if AVERROR(EAGAIN)
Browse files Browse the repository at this point in the history
  • Loading branch information
zillevdr committed Mar 2, 2021
1 parent 4befc12 commit c689028
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions codec.c
Expand Up @@ -272,7 +272,7 @@ void CodecVideoClose(VideoDecoder * decoder)
*/
int CodecVideoSendPacket(VideoDecoder * decoder, const AVPacket * avpkt)
{
int ret;
int ret = AVERROR_DECODER_NOT_FOUND;

#if 0
if (!decoder->VideoCtx->extradata_size) {
Expand Down Expand Up @@ -319,9 +319,6 @@ int CodecVideoSendPacket(VideoDecoder * decoder, const AVPacket * avpkt)
pthread_mutex_lock(&CodecLockMutex);
if (decoder->VideoCtx) {
ret = avcodec_send_packet(decoder->VideoCtx, avpkt);
} else {
pthread_mutex_unlock(&CodecLockMutex);
return 1;
}
pthread_mutex_unlock(&CodecLockMutex);
#ifdef DEBUG
Expand Down

0 comments on commit c689028

Please sign in to comment.