Fix a number of MSVC warnings

Fixes a number of warnings with all modules
This commit is contained in:
jp9000
2017-12-05 13:53:18 -08:00
parent ffdecc34f4
commit 0d6204c8af
19 changed files with 185 additions and 101 deletions

View File

@@ -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;