Skip to content

Commit d77c3b4

Browse files
committed
bug: not allowed to cache function pointer, fix readme typo
1 parent 348250d commit d77c3b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Here is a list of the available encoding parameters:
7373
You can list all available encoders with ``ffmpeg --codecs``. In the h264 row, look for ``(encoders)``.
7474
- ``preset``: default is empty (""). Valid values can be for instance ``slow``, ``ll`` (low latency) etc.
7575
To find out what presets are available, run e.g.
76-
``fmpeg -hide_banner -f lavfi -i nullsrc -c:v libx264 -preset help -f mp4 - 2>&1``
76+
``ffmpeg -hide_banner -f lavfi -i nullsrc -c:v libx264 -preset help -f mp4 - 2>&1``
7777
- ``profile``: For instance ``baseline``, ``main``. See [the ffmpeg website](https://trac.ffmpeg.org/wiki/Encode/H.264).
7878
- ``tune``: See [the ffmpeg website](https://trac.ffmpeg.org/wiki/Encode/H.264). The default is empty("").
7979
- ``gop_size``: The number of frames between keyframes. Default: 10.

‎src/ffmpeg_publisher.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ rmw_qos_profile_t FFMPEGPublisher::initialize(
204204
void FFMPEGPublisher::publish(const Image & msg, const PublishFn & publish_fn) const
205205
{
206206
FFMPEGPublisher * me = const_cast<FFMPEGPublisher *>(this);
207+
me->publishFunction_ = &publish_fn;
207208
if (!me->encoder_.isInitialized()) {
208-
me->publishFunction_ = &publish_fn;
209209
if (!me->encoder_.initialize(
210210
msg.width, msg.height,
211211
std::bind(&FFMPEGPublisher::packetReady, me, _1, _2, _3, _4, _5, _6, _7, _8, _9))) {

0 commit comments

Comments
 (0)