Skip to content

Commit

Permalink
Bug fix during catkin build (AutonomyLab#164)
Browse files Browse the repository at this point in the history
* Bug fix during catkin build

The bug during the catkin build process has been fixed in according to the issue AutonomyLab#132 and explained in 78071a14 of the FFmpeg repository

* Updated changelog and package files

Updated changelog and package file into the bebop_driver folder.
  • Loading branch information
gsilano authored and robohacker committed Jul 23, 2018
1 parent e00904c commit b0cf0a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions bebop_driver/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package bebop_driver
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.7.1 (2018-05-31)
------------------
* Fixed the bug appearing when you run the catkin build command
* Contributors: Giuseppe Silano

0.7.0 (2017-07-29)
------------------
* SDK 3.12.6 support (except 64bit Ubuntu Xenial, working on fix)
Expand Down
2 changes: 1 addition & 1 deletion bebop_driver/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>bebop_driver</name>
<version>0.7.0</version>
<version>0.7.1</version>
<description>ROS driver for Parrot Bebop drone, based on Parrot’s official ARDroneSDK3</description>

<maintainer email="[email protected]">Mani Monajjemi</maintainer>
Expand Down
6 changes: 3 additions & 3 deletions bebop_driver/src/bebop_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ bool VideoDecoder::ReallocateBuffers()
boost::lexical_cast<std::string>(codec_ctx_ptr_->width) +
" x " + boost::lexical_cast<std::string>(codec_ctx_ptr_->width));

const uint32_t num_bytes = avpicture_get_size(PIX_FMT_RGB24, codec_ctx_ptr_->width, codec_ctx_ptr_->width);
const uint32_t num_bytes = avpicture_get_size(AV_PIX_FMT_RGB24, codec_ctx_ptr_->width, codec_ctx_ptr_->width);
frame_rgb_ptr_ = av_frame_alloc();

ThrowOnCondition(!frame_rgb_ptr_, "Can not allocate memory for frames!");
Expand All @@ -143,12 +143,12 @@ bool VideoDecoder::ReallocateBuffers()
std::string("Can not allocate memory for the buffer: ") +
boost::lexical_cast<std::string>(num_bytes));
ThrowOnCondition(0 == avpicture_fill(
reinterpret_cast<AVPicture*>(frame_rgb_ptr_), frame_rgb_raw_ptr_, PIX_FMT_RGB24,
reinterpret_cast<AVPicture*>(frame_rgb_ptr_), frame_rgb_raw_ptr_, AV_PIX_FMT_RGB24,
codec_ctx_ptr_->width, codec_ctx_ptr_->height),
"Failed to initialize the picture data structure.");

img_convert_ctx_ptr_ = sws_getContext(codec_ctx_ptr_->width, codec_ctx_ptr_->height, codec_ctx_ptr_->pix_fmt,
codec_ctx_ptr_->width, codec_ctx_ptr_->height, PIX_FMT_RGB24,
codec_ctx_ptr_->width, codec_ctx_ptr_->height, AV_PIX_FMT_RGB24,
SWS_FAST_BILINEAR, NULL, NULL, NULL);
}
catch (const std::runtime_error& e)
Expand Down

0 comments on commit b0cf0a7

Please sign in to comment.