Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 834405

Summary: media-video/harvid-0.8.3-r1 with ffmpeg-5.0: ffdecoder.c:261:19: error: ‘AVPicture’ undeclared (first use in this function); did you mean ‘AVPictureType’?
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 831437    
Attachments: build.log.gz
emerge-info.txt

Description Kobboi 2022-02-28 20:57:49 UTC
x86_64-pc-linux-gnu-gcc -c -o vinfo.o -O2 -march=znver3 -pipe -g -ggdb3   `pkg-config --cflags libavcodec libavformat libavutil libswscale` vinfo.c
ffdecoder.c: In function ‘ff_picture_bytesize’:
ffdecoder.c:91:18: warning: implicit declaration of function ‘avpicture_get_size’; did you mean ‘ff_picture_bytesize’? [-Wimplicit-function-declaration]
   91 |   const int bs = avpicture_get_size(render_fmt, w, h);
      |                  ^~~~~~~~~~~~~~~~~~
      |                  ff_picture_bytesize
ffdecoder.c: In function ‘ff_init_moviebuffer’:
ffdecoder.c:261:3: warning: implicit declaration of function ‘avpicture_fill’ [-Wimplicit-function-declaration]
  261 |   avpicture_fill((AVPicture *)ff->pFrameFMT, ff->buffer, ff->render_fmt, ff->out_width, ff->out_height);
      |   ^~~~~~~~~~~~~~
ffdecoder.c:261:19: error: ‘AVPicture’ undeclared (first use in this function); did you mean ‘AVPictureType’?
  261 |   avpicture_fill((AVPicture *)ff->pFrameFMT, ff->buffer, ff->render_fmt, ff->out_width, ff->out_height);
      |                   ^~~~~~~~~
      |                   AVPictureType
ffdecoder.c:261:19: note: each undeclared identifier is reported only once for each function it appears in
ffdecoder.c:261:30: error: expected expression before ‘)’ token
  261 |   avpicture_fill((AVPicture *)ff->pFrameFMT, ff->buffer, ff->render_fmt, ff->out_width, ff->out_height);
      |                              ^
ffdecoder.c: In function ‘ff_initialize’:
ffdecoder.c:266:3: warning: implicit declaration of function ‘av_register_all’ [-Wimplicit-function-declaration]
  266 |   av_register_all();
      |   ^~~~~~~~~~~~~~~
ffdecoder.c:267:3: warning: implicit declaration of function ‘avcodec_register_all’ [-Wimplicit-function-declaration]
  267 |   avcodec_register_all();
      |   ^~~~~~~~~~~~~~~~~~~~
ffdecoder.c: In function ‘ff_set_framerate’:
ffdecoder.c:321:21: warning: implicit declaration of function ‘av_stream_get_r_frame_rate’; did you mean ‘av_stream_get_side_data’? [-Wimplicit-function-declaration]
  321 |     AVRational fr = av_stream_get_r_frame_rate (av_stream);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                     av_stream_get_side_data
ffdecoder.c:321:21: error: invalid initializer
ffdecoder.c: In function ‘ff_open_movie’:
ffdecoder.c:410:34: error: ‘AVStream’ has no member named ‘codec’
  410 |     if(ff->pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
      |                                  ^~
ffdecoder.c:461:59: error: ‘AVStream’ has no member named ‘codec’
  461 |   ff->pCodecCtx = ff->pFormatCtx->streams[ff->videoStream]->codec;
      |                                                           ^~
ffdecoder.c:488:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  488 |   pCodec = avcodec_find_decoder(ff->pCodecCtx->codec_id);
      |          ^
ffdecoder.c: In function ‘parse_pts_from_frame’:
ffdecoder.c:538:11: warning: implicit declaration of function ‘av_frame_get_best_effort_timestamp’ [-Wimplicit-function-declaration]
  538 |     pts = av_frame_get_best_effort_timestamp (f);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ffdecoder.c:550:14: error: ‘AVFrame’ has no member named ‘pkt_pts’; did you mean ‘pkt_dts’?
  550 |     pts = f->pkt_pts;
      |              ^~~~~~~
      |              pkt_dts
ffdecoder.c: In function ‘my_seek_frame’:
ffdecoder.c:620:9: warning: implicit declaration of function ‘av_free_packet’; did you mean ‘av_get_packet’? [-Wimplicit-function-declaration]
  620 |         av_free_packet (packet);
      |         ^~~~~~~~~~~~~~
      |         av_get_packet
ffdecoder.c:635:11: warning: implicit declaration of function ‘avcodec_decode_video2’; did you mean ‘avcodec_decode_subtitle2’? [-Wimplicit-function-declaration]
  635 |     err = avcodec_decode_video2 (ff->pCodecCtx, ff->pFrame, &frameFinished, packet);
      |           ^~~~~~~~~~~~~~~~~~~~~
      |           avcodec_decode_subtitle2
ffdecoder.c: In function ‘ff_set_bufferptr’:
ffdecoder.c:773:19: error: ‘AVPicture’ undeclared (first use in this function); did you mean ‘AVPictureType’?
  773 |   avpicture_fill((AVPicture *)ff->pFrameFMT, ff->buffer, ff->render_fmt, ff->out_width, ff->out_height);
      |                   ^~~~~~~~~
      |                   AVPictureType
ffdecoder.c:773:30: error: expected expression before ‘)’ token
  773 |   avpicture_fill((AVPicture *)ff->pFrameFMT, ff->buffer, ff->render_fmt, ff->out_width, ff->out_height);
      |                              ^
make: *** [Makefile:84: ffdecoder.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/var/tmp/portage/media-video/harvid-0.8.3-r1/work/harvid-0.8.3/libharvid'
 * ERROR: media-video/harvid-0.8.3-r1::gentoo failed (compile phase):
 *   emake failed


Reproducible: Always
Comment 1 Kobboi 2022-02-28 20:58:05 UTC
Created attachment 766069 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 20:58:07 UTC
Created attachment 766070 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 20:58:22 UTC
Compiles fine with ffmpeg-4.4.1
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-26 05:26:56 UTC
Fixed upstream in 0.5.0. There's an extra commit which may be worth backporting too.
Comment 5 Larry the Git Cow gentoo-dev 2022-07-26 06:22:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c1f4ef586b880319c2d4194244c764b15dbb536

commit 4c1f4ef586b880319c2d4194244c764b15dbb536
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-26 05:42:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-26 06:22:04 +0000

    media-video/harvid: add 0.9.0
    
    Closes: https://bugs.gentoo.org/834405
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/harvid/Manifest                        |  1 +
 media-video/harvid/files/harvid-0.9.0-ffmpeg.patch | 21 +++++++++
 .../harvid/files/harvid-0.9.0-parallel-build.patch | 40 ++++++++++++++++
 media-video/harvid/harvid-0.9.0.ebuild             | 55 ++++++++++++++++++++++
 4 files changed, 117 insertions(+)