Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2022-02-18 20:25:31 +0300
committerSebastian Parborg <darkdefende@gmail.com>2022-02-18 20:25:31 +0300
commitc2016feadc8fe83565ea1e405e36221d05163e5b (patch)
tree3c2694e6235e82ea2415be2606d2ca3f4e1d7805 /source/blender/imbuf
parent16ab6111f758ef77bd0e53ce2379ee8281629776 (diff)
parentaf6a1b08e3f0d0070ac9423868d2d3f81057717a (diff)
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/IMB_anim.h2
-rw-r--r--source/blender/imbuf/intern/anim_movie.c2
-rw-r--r--source/blender/imbuf/intern/indexer.c13
-rw-r--r--source/blender/imbuf/intern/util.c2
4 files changed, 7 insertions, 12 deletions
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index bad2081448f..e99572adbb0 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -108,7 +108,7 @@ struct anim {
#ifdef WITH_FFMPEG
AVFormatContext *pFormatCtx;
AVCodecContext *pCodecCtx;
- AVCodec *pCodec;
+ const AVCodec *pCodec;
AVFrame *pFrame;
int pFrameComplete;
AVFrame *pFrameRGB;
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 4125662d35f..469141cb996 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -492,7 +492,7 @@ static int startffmpeg(struct anim *anim)
{
int i, video_stream_index;
- AVCodec *pCodec;
+ const AVCodec *pCodec;
AVFormatContext *pFormatCtx = NULL;
AVCodecContext *pCodecCtx;
AVRational frame_rate;
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 2cf82ca5c48..7e24ca44244 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -478,7 +478,7 @@ struct proxy_output_ctx {
AVFormatContext *of;
AVStream *st;
AVCodecContext *c;
- AVCodec *codec;
+ const AVCodec *codec;
struct SwsContext *sws_ctx;
AVFrame *frame;
int cfra;
@@ -510,12 +510,9 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
rv->st = avformat_new_stream(rv->of, NULL);
rv->st->id = 0;
- rv->c = avcodec_alloc_context3(NULL);
- rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
- rv->c->codec_id = AV_CODEC_ID_H264;
+ rv->codec = avcodec_find_encoder(AV_CODEC_ID_H264);
- rv->of->oformat->video_codec = rv->c->codec_id;
- rv->codec = avcodec_find_encoder(rv->c->codec_id);
+ rv->c = avcodec_alloc_context3(rv->codec);
if (!rv->codec) {
fprintf(stderr,
@@ -527,8 +524,6 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
return NULL;
}
- avcodec_get_context_defaults3(rv->c, rv->codec);
-
rv->c->width = width;
rv->c->height = height;
rv->c->gop_size = 10;
@@ -779,7 +774,7 @@ typedef struct FFmpegIndexBuilderContext {
AVFormatContext *iFormatCtx;
AVCodecContext *iCodecCtx;
- AVCodec *iCodec;
+ const AVCodec *iCodec;
AVStream *iStream;
int videoStream;
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index cabd6070400..241f1a736f4 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -250,7 +250,7 @@ static int isffmpeg(const char *filepath)
AVFormatContext *pFormatCtx = NULL;
unsigned int i;
int videoStream;
- AVCodec *pCodec;
+ const AVCodec *pCodec;
if (BLI_path_extension_check_n(filepath,
".swf",