int errn;\r
\r
AVFormatContext* weak_format_context_ = nullptr;\r
- errn = errn = av_open_input_file(&weak_format_context_, narrow(filename).c_str(), nullptr, 0, nullptr);\r
+ errn = av_open_input_file(&weak_format_context_, narrow(filename).c_str(), nullptr, 0, nullptr);\r
if(errn < 0 || weak_format_context_ == nullptr)\r
{ \r
BOOST_THROW_EXCEPTION(\r
\r
format_context_.reset(weak_format_context_, av_close_input_file);\r
\r
- errn = errn = av_find_stream_info(format_context_.get());\r
+ errn = av_find_stream_info(format_context_.get());\r
if(errn < 0)\r
{ \r
BOOST_THROW_EXCEPTION(\r
void read_file()\r
{ \r
if(audio_packet_buffer_.size() > 4 && video_packet_buffer_.size() > 4)\r
- boost::this_thread::yield(); // There are enough packets, no hurry.\r
+ boost::this_thread::sleep(boost::posix_time::millisec(5)); // There are enough packets, no hurry.\r
\r
try\r
{\r
invalid_operation() << \r
source_info(narrow(print())) << \r
msg_info(av_error_str(errn)) <<\r
- boost::errinfo_api_function("seek_frame") <<\r
+ boost::errinfo_api_function("av_seek_frame") <<\r
boost::errinfo_errno(AVUNERROR(errn)));\r
}\r
} \r