Opened 9 years ago

Closed 9 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 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Timothy Gu, 9 years ago

Keywords: build added
Priority: criticalimportant

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

by lqsa00, 9 years ago

Attachment: Compile output.txt added

comment:2 by Hendrik, 9 years ago

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 by lqsa00, 9 years ago

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 by lqsa00, 9 years ago

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

comment:5 by Timothy Gu, 9 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.