void-packages/srcpkgs/arcan/patches/ffmpeg4.patch

63 lines
2.4 KiB
Diff

--- src/frameserver/encode/default/encode.c 2018-04-15 11:19:51.000000000 +0200
+++ src/frameserver/encode/default/encode.c 2018-04-15 11:19:51.000000000 +0200
@@ -285,8 +285,8 @@
/*
* for the flush case, we may have a little bit of buffers left, both in the
* encoder and the resampler,
- * CODEC_CAP_DELAY = pframe can be NULL and encode audio is used to flush
- * CODEC_CAP_SMALL_LAST_FRAME or CODEC_CAP_VARIABLE_FRAME_SIZE =
+ * AV_CODEC_CAP_DELAY = pframe can be NULL and encode audio is used to flush
+ * AV_CODEC_CAP_SMALL_LAST_FRAME or AV_CODEC_CAP_VARIABLE_FRAME_SIZE =
* we can the last few buffer bytes can be stored as well otherwise those
* will be discarded
*/
@@ -298,8 +298,8 @@
* and then re-use the encode / conversion code
*/
if (!forcetog &&
- ((ctx->flags & CODEC_CAP_SMALL_LAST_FRAME) > 0 ||
- (ctx->flags & CODEC_CAP_VARIABLE_FRAME_SIZE) > 0)){
+ ((ctx->flags & AV_CODEC_CAP_SMALL_LAST_FRAME) > 0 ||
+ (ctx->flags & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) > 0)){
recctx.aframe_insz = recctx.encabuf_ofs;
recctx.aframe_smplcnt = recctx.aframe_insz >> 2;
frame = av_frame_alloc();
@@ -309,7 +309,7 @@
goto forceencode;
}
- if ( (ctx->flags & CODEC_CAP_DELAY) > 0 ){
+ if ( (ctx->flags & AV_CODEC_CAP_DELAY) > 0 ){
int gotpkt;
do {
AVPacket flushpkt = {0};
@@ -638,7 +638,7 @@
* for float conversion, we need to double afterwards
*/
- if ( (recctx.acodec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) > 0){
+ if ( (recctx.acodec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) > 0){
recctx.aframe_smplcnt = recctx.acontext->frame_size ?
recctx.acontext->frame_size : round( samplerate / fps );
}
--- src/frameserver/encode/default/encode_presets.c 2018-04-15 11:19:51.000000000 +0200
+++ src/frameserver/encode/default/encode_presets.c 2018-04-15 11:19:51.000000000 +0200
@@ -379,7 +379,7 @@
a.storage.video.context = avcodec_alloc_context3( a.storage.video.codec );
if (flags & AVFMT_GLOBALHEADER)
- a.storage.video.context->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ a.storage.video.context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
return a;
}
@@ -397,7 +397,7 @@
res.storage.audio.context = avcodec_alloc_context3( res.storage.audio.codec);
if ( (flags & AVFMT_GLOBALHEADER) > 0){
- res.storage.audio.context->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ res.storage.audio.context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}
return res;