Unverified Commit e4c56081 authored by Prabhat Roy's avatar Prabhat Roy Committed by GitHub
Browse files

Fixed comparison warnings in audio_stream and video_stream (#4007)

* Fixed comparison warnings in audio_stream and video_stream

* Fixed clang error
parent befbe1b3
......@@ -7,13 +7,13 @@ namespace ffmpeg {
namespace {
bool operator==(const AudioFormat& x, const AVFrame& y) {
return x.samples == y.sample_rate && x.channels == y.channels &&
x.format == y.format;
return x.samples == static_cast<size_t>(y.sample_rate) &&
x.channels == static_cast<size_t>(y.channels) && x.format == y.format;
}
bool operator==(const AudioFormat& x, const AVCodecContext& y) {
return x.samples == y.sample_rate && x.channels == y.channels &&
x.format == y.sample_fmt;
return x.samples == static_cast<size_t>(y.sample_rate) &&
x.channels == static_cast<size_t>(y.channels) && x.format == y.sample_fmt;
}
AudioFormat& toAudioFormat(AudioFormat& x, const AVFrame& y) {
......
......@@ -6,11 +6,13 @@ namespace ffmpeg {
namespace {
bool operator==(const VideoFormat& x, const AVFrame& y) {
return x.width == y.width && x.height == y.height && x.format == y.format;
return x.width == static_cast<size_t>(y.width) &&
x.height == static_cast<size_t>(y.height) && x.format == y.format;
}
bool operator==(const VideoFormat& x, const AVCodecContext& y) {
return x.width == y.width && x.height == y.height && x.format == y.pix_fmt;
return x.width == static_cast<size_t>(y.width) &&
x.height == static_cast<size_t>(y.height) && x.format == y.pix_fmt;
}
VideoFormat& toVideoFormat(VideoFormat& x, const AVFrame& y) {
......
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