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

@@ -92,7 +92,13 @@ static inline bool init_output(media_remux_job_t job, const char *out_filename)
return false;
}
ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
AVCodecParameters *par = avcodec_parameters_alloc();
ret = avcodec_parameters_from_context(par, in_stream->codec);
if (ret == 0)
ret = avcodec_parameters_to_context(out_stream->codec,
par);
avcodec_parameters_free(&par);
if (ret < 0) {
blog(LOG_ERROR, "media_remux: Failed to copy context");
return false;
@@ -194,7 +200,7 @@ static inline int process_packets(media_remux_job_t job,
job->ofmt_ctx->streams[pkt.stream_index]);
ret = av_interleaved_write_frame(job->ofmt_ctx, &pkt);
av_free_packet(&pkt);
av_packet_unref(&pkt);
if (ret < 0) {
blog(LOG_ERROR, "media_remux: Error muxing packet: %s",