archrelease: copy trunk to community-any
[ArchLinux/community.git] / tupitube / trunk / ffmpeg5.patch
bloba849dfa360de4647dcab1b44ee93817cce19e9d4
1 diff --git a/configure.tests/ffmpeg/main.cpp b/configure.tests/ffmpeg/main.cpp
2 index 907500d3..42d2eda9 100644
3 --- a/configure.tests/ffmpeg/main.cpp
4 +++ b/configure.tests/ffmpeg/main.cpp
5 @@ -43,7 +43,7 @@ extern "C" {
7 int main()
9 - AVOutputFormat *format = av_guess_format("ffh264", NULL, NULL);
10 + const AVOutputFormat *format = av_guess_format("ffh264", NULL, NULL);
12 AVFormatContext *formatContext = avformat_alloc_context();
13 formatContext->oformat = format;
14 @@ -53,7 +53,7 @@ int main()
16 stream = avformat_new_stream(formatContext, 0);
18 - AVCodec *codec = avcodec_find_encoder(stream->codecpar->codec_id);
19 + const AVCodec *codec = avcodec_find_encoder(stream->codecpar->codec_id);
20 if (!codec) {
21 av_log(NULL, AV_LOG_ERROR, "Failed to find decoder for stream\n");
22 return AVERROR_DECODER_NOT_FOUND;
23 diff --git a/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp b/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp
24 index 2ecd5e79..52bd604b 100644
25 --- a/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp
26 +++ b/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp
27 @@ -40,6 +40,7 @@
28 #include "talgorithm.h"
30 #include <QDir>
31 +#include <QDebug>
32 #include <QTimer>
34 // Handy documentation about Libav library
35 @@ -213,7 +214,6 @@ AVStream * TFFmpegMovieGenerator::addVideoStream()
36 return nullptr;
39 - /* SQA: Code pending for review
40 codecContext = avcodec_alloc_context3(codec);
41 if (!codecContext) {
42 qDebug() << "Could not allocate video codec context";
43 @@ -223,9 +223,6 @@ AVStream * TFFmpegMovieGenerator::addVideoStream()
44 qDebug() << "Could not copy parameters to context";
45 return nullptr;
47 - */
49 - codecContext = st->codec;
51 // Put sample parameters
52 codecContext->bit_rate = 6000000;
53 diff --git a/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.h b/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.h
54 index 257994c2..7bc60251 100644
55 --- a/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.h
56 +++ b/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.h
57 @@ -92,7 +92,7 @@ class TUPITUBE_PLUGIN TFFmpegMovieGenerator : public TMovieGenerator
58 AVFrame *videoFrame;
59 AVStream *video_st;
60 AVFormatContext *formatContext;
61 - AVOutputFormat *outputFormat;
62 + const AVOutputFormat *outputFormat;
63 AVCodecContext *codecContext;
64 enum AVCodecID videoCodecID;
65 const AVCodec *codec;