diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp index 4ec9f1388..fa561ddb4 100644 --- a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp +++ b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp @@ -136,7 +136,7 @@ bool FFmpegDecoder::open(const std::string & filename, FFmpegParameters* paramet throw std::runtime_error("av_find_stream_info() failed"); m_duration = double(m_format_context->duration) / AV_TIME_BASE; - if (m_format_context->start_time != AV_NOPTS_VALUE) + if (m_format_context->start_time != static_cast(AV_NOPTS_VALUE)) m_start = double(m_format_context->start_time) / AV_TIME_BASE; else m_start = 0; @@ -265,8 +265,6 @@ inline void FFmpegDecoder::flushVideoQueue() m_video_queue.flush(pc); } - - bool FFmpegDecoder::readNextPacketNormal() { AVPacket packet; @@ -279,7 +277,8 @@ bool FFmpegDecoder::readNextPacketNormal() int error = av_read_frame(m_format_context.get(), &packet); if (error < 0) { - if (error == AVERROR_EOF || m_format_context.get()->pb->eof_reached) + if (error == static_cast(AVERROR_EOF) || + m_format_context.get()->pb->eof_reached) end_of_stream = true; else { OSG_FATAL << "av_read_frame() returned " << AvStrError(error) << std::endl; diff --git a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp index 1cb819f2a..288e44052 100644 --- a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp +++ b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp @@ -27,9 +27,9 @@ namespace osgFFmpeg { FFmpegParameters::FFmpegParameters() : + m_format(0), m_context(0), - m_options(0), - m_format(0) + m_options(0) { // Initialize the dictionary av_dict_set(&m_options, "foo", "bar", 0);