Opened 3 years ago

Closed 3 years ago

#5289 closed defect (invalid)

frame.h:171: error: redefinition of 'struct AVFrame'

Reported by: lqsa00 Owned by:
Priority: important Component: undetermined
Version: unspecified Keywords: build
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Compiling the transcoding.c sample, appears the struct AVFrame defined twice, in avcodec.h and frame.h.

It doesn't compile.

Attachments (1)

Compile output.txt (10.0 KB) - added by lqsa00 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by Timothy_Gu

  • Keywords build added
  • Priority changed from critical to important

Can you please paste the full uncut command output when you are building? Thanks.

Changed 3 years ago by lqsa00

comment:2 Changed 3 years ago by heleppkes

Your build is mixing two different FFmpeg versions:
C:\Qt\5.5\android_armv7\include/libavutil/frame.h
..\..\..\programacio\libs\FFmpeg\Android\ffmpeg-build\armeabi-v7a\include/libavformat/avformat.h

No wonder everything breaks.

comment:3 Changed 3 years ago by lqsa00

I'm trying to use ffmpeg libraries on Android QT application. After compile the libraries for Android, I've created a QT project containing transcoding.c and linked against the compiled libraries.

I've must to define the INT64_C and declare extern C the includes:

#ifndef INT64_C

#define INT64_C(c) (c ## LL)

#define UINT64_C(c) (c ## ULL)

#endif

extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/avfiltergraph.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
#include <libavutil/opt.h>
#include <libavutil/pixdesc.h>
}

When compile, appears some errors, and one of them is the AVFrame duplication.

I've attached the compile output.

comment:4 Changed 3 years ago by lqsa00

Ok, thank you very much. I've installed QtAV, and I suppose that mixs the libraries.

comment:5 Changed 3 years ago by Timothy_Gu

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.