[FFmpeg-devel] [PATCH] doc: fix option setting for encoding example

Michael Bradshaw mjbshaw at gmail.com
Tue Jan 13 19:26:10 CET 2015


In the encoding/decoding example[1], in the video_encode_example()
function, av_opt_set() is used to set the option "preset" to "slow" (here,
c is a AVCodecContext*):

    av_opt_set(c->priv_data, "preset", "slow", 0);

I presume this is wrong to use priv_data, and instead the codec context
should be passed. Attached patch passes the codec context instead of
priv_data.

[1]: https://ffmpeg.org/pipermail/libav-user/2014-December/007689.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-doc-fix-option-setting-for-encoding-example.patch
Type: application/octet-stream
Size: 895 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150113/c22a4794/attachment.obj>


More information about the ffmpeg-devel mailing list