Fix a number of MSVC warnings
Fixes a number of warnings with all modules
This commit is contained in:
@@ -300,8 +300,19 @@ static bool do_encode(struct enc_encoder *enc,
|
||||
|
||||
enc->total_samples += enc->frame_size;
|
||||
|
||||
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 40, 101)
|
||||
ret = avcodec_send_frame(enc->context, enc->aframe);
|
||||
if (ret == 0)
|
||||
ret = avcodec_receive_packet(enc->context, &avpacket);
|
||||
|
||||
got_packet = (ret == 0);
|
||||
|
||||
if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN))
|
||||
ret = 0;
|
||||
#else
|
||||
ret = avcodec_encode_audio2(enc->context, &avpacket, enc->aframe,
|
||||
&got_packet);
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
warn("avcodec_encode_audio2 failed: %s", av_err2str(ret));
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user