Commit 7339c2bd authored by Philippe Gorley's avatar Philippe Gorley Committed by Adrien Béraud

media: fix build warnings

Change-Id: I3b377854857eee866929d3c4228c21a3c81461cf
parent 780a9d57
......@@ -36,7 +36,7 @@ AudioStream::AudioStream(pa_context *c,
const PaDeviceInfos* infos,
bool ec,
OnReady onReady)
: audiostream_(0), mainloop_(m), onReady_(std::move(onReady))
: onReady_(std::move(onReady)), audiostream_(0), mainloop_(m)
{
const pa_channel_map channel_map = infos->channel_map;
......
......@@ -48,6 +48,7 @@ av_frame_new_side_data_from_buf(AVFrame* frame, enum AVFrameSideDataType type, A
side_data->buf = buf;
side_data->data = side_data->buf->data;
side_data->size = side_data->buf->size;
return side_data;
}
#endif
}
......
......@@ -247,7 +247,7 @@ MediaEncoder::initStream(const SystemCodecInfo& systemCodecInfo, AVBufferRef* fr
// Streaming => VBV (constrained encoding) + CRF (Constant Rate Factor)
if (crf == SystemCodecInfo::DEFAULT_NO_QUALITY)
crf = 30; // good value for H264-720p@30
JAMI_DBG("H264 encoder setup: crf=%u, maxrate=%u, bufsize=%u", crf, maxBitrate, bufSize);
JAMI_DBG("H264 encoder setup: crf=%u, maxrate=%lu, bufsize=%lu", crf, maxBitrate, bufSize);
libav_utils::setDictValue(&options_, "crf", std::to_string(crf));
av_opt_set_int(encoderCtx, "crf", crf, AV_OPT_SEARCH_CHILDREN);
encoderCtx->rc_buffer_size = bufSize;
......@@ -277,7 +277,7 @@ MediaEncoder::initStream(const SystemCodecInfo& systemCodecInfo, AVBufferRef* fr
av_opt_set_int(encoderCtx, "crf", crf, AV_OPT_SEARCH_CHILDREN);
JAMI_DBG("Using quality factor %d", crf);
} else {
JAMI_DBG("Using Max bitrate %d", maxBitrate);
JAMI_DBG("Using Max bitrate %lu", maxBitrate);
}
} else if (systemCodecInfo.avcodecId == AV_CODEC_ID_MPEG4) {
// For MPEG4 :
......@@ -285,11 +285,11 @@ MediaEncoder::initStream(const SystemCodecInfo& systemCodecInfo, AVBufferRef* fr
// Use CBR (set bitrate)
encoderCtx->rc_buffer_size = maxBitrate;
encoderCtx->bit_rate = encoderCtx->rc_min_rate = encoderCtx->rc_max_rate = maxBitrate;
JAMI_DBG("Using Max bitrate %d", maxBitrate);
JAMI_DBG("Using Max bitrate %lu", maxBitrate);
} else if (systemCodecInfo.avcodecId == AV_CODEC_ID_H263) {
encoderCtx->bit_rate = encoderCtx->rc_max_rate = maxBitrate;
encoderCtx->rc_buffer_size = maxBitrate;
JAMI_DBG("Using Max bitrate %d", maxBitrate);
JAMI_DBG("Using Max bitrate %lu", maxBitrate);
}
// add video stream to outputformat context
......@@ -522,7 +522,7 @@ MediaEncoder::send(AVPacket& pkt, int streamIdx)
}
if (streamIdx < 0)
streamIdx = currentStreamIdx_;
if (streamIdx >= 0 and streamIdx < encoders_.size()) {
if (streamIdx >= 0 and static_cast<size_t>(streamIdx) < encoders_.size()) {
auto encoderCtx = encoders_[streamIdx];
pkt.stream_index = streamIdx;
if (pkt.pts != AV_NOPTS_VALUE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment