openlase icon indicating copy to clipboard operation
openlase copied to clipboard

qplayvid.c compile errors: get_buffer2, av_frame_get_best_effort_timestamp

Open kamalmostafa opened this issue 10 years ago • 2 comments

Commit 3fd071e0 "Update qplayvid to newer ffmpeg APIs" breaks the build for all systems which supply ffmpeg/libav versions < 56 (i.e. practically all current systems!) ...

qplayvid.c: In function ‘decode_audio’:
qplayvid.c:140:18: error: ‘AVCodecContext’ has no member named ‘get_buffer2’
  ctx->a_codec_ctx->get_buffer2(ctx->a_codec_ctx, ctx->a_frame, 0);
                  ^
qplayvid.c: In function ‘decode_video’:
qplayvid.c:225:2: warning: implicit declaration of function ‘av_frame_get_best_effort_timestamp’ [-Wimplicit-function-declaration]
  frame_pts = av_frame_get_best_effort_timestamp(ctx->v_frame);
  ^
make[2]: *** [tools/qplayvid/CMakeFiles/qplayvid.dir/qplayvid.c.o] Error 1
make[1]: *** [tools/qplayvid/CMakeFiles/qplayvid.dir/all] Error 2
make: *** [all] Error 2

My pending pull request marcan/openlase#17 now includes this patch to unbreak it: Commit 12574cb "Fix qplayvid build for older ffmpeg APIs".

kamalmostafa avatar Apr 13 '14 15:04 kamalmostafa

This fix is needed to build on Ubuntu 14.04 / Mint 17. Any chance this will be merged soon?

ottobonn avatar Aug 20 '14 05:08 ottobonn

I thank you very much kamalmostafa, I use Ubuntu 14.04. After a (long) fight for dependencies, the last but not the least qplayvid.c.o refused compilation. I was lost, your commits 3fd071e & 12574cb saved my night at 2:30 AM local french time !

replica3363 avatar Dec 23 '14 01:12 replica3363