[FFmpeg-devel] [PATCH 47/50] doc/examples/vaapi_transcode: use av_packet_alloc() to allocate packets

Michael Niedermayer michael at niedermayer.cc
Fri Feb 5 18:49:06 EET 2021


On Thu, Feb 04, 2021 at 04:10:02PM -0300, James Almer wrote:
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  doc/examples/vaapi_transcode.c | 45 ++++++++++++++++++++--------------
>  1 file changed, 26 insertions(+), 19 deletions(-)

maybe i forgot something but this 
breaks build here

make -j32 doc/examples/vaapi_transcode.o
CC	doc/examples/vaapi_transcode.o
doc/examples/vaapi_transcode.c: In function ‘main’:
doc/examples/vaapi_transcode.c:296:21: warning: passing argument 1 of ‘av_packet_unref’ from incompatible pointer type [-Wincompatible-pointer-types]
     av_packet_unref(&dec_pkt);
                     ^
In file included from ./libavcodec/bsf.h:30:0,
                 from ./libavcodec/avcodec.h:44,
                 from doc/examples/vaapi_transcode.c:38:
./libavcodec/packet.h:682:6: note: expected ‘AVPacket * {aka struct AVPacket *}’ but argument is of type ‘AVPacket ** {aka struct AVPacket **}’
 void av_packet_unref(AVPacket *pkt);
      ^~~~~~~~~~~~~~~
doc/examples/vaapi_transcode.c:300:11: error: too few arguments to function ‘encode_write’
     ret = encode_write(NULL);
           ^~~~~~~~~~~~
doc/examples/vaapi_transcode.c:112:12: note: declared here
 static int encode_write(AVPacket *enc_pkt, AVFrame *frame)
            ^~~~~~~~~~~~
ffbuild/common.mak:67: recipe for target 'doc/examples/vaapi_transcode.o' failed
make: *** [doc/examples/vaapi_transcode.o] Error 1


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210205/c5762141/attachment.sig>


More information about the ffmpeg-devel mailing list