void-packages/srcpkgs/goldendict/patches/ffmpeg4.patch
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

21 lines
743 B
Diff

--- a/ffmpegaudio.cc.orig 2018-05-09 22:16:13.480659958 +0200
+++ b/ffmpegaudio.cc 2018-05-09 22:16:50.748322790 +0200
@@ -143,7 +143,7 @@
return false;
}
- unsigned char * avioBuffer = ( unsigned char * )av_malloc( kBufferSize + FF_INPUT_BUFFER_PADDING_SIZE );
+ unsigned char * avioBuffer = ( unsigned char * )av_malloc( kBufferSize + AV_INPUT_BUFFER_PADDING_SIZE );
if ( !avioBuffer )
{
errorString = QObject::tr( "av_malloc() failed." );
@@ -380,7 +380,7 @@
}
if ( !Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) &&
- codecContext_->codec->capabilities & CODEC_CAP_DELAY )
+ codecContext_->codec->capabilities & AV_CODEC_CAP_DELAY )
{
av_init_packet( &packet );
int gotFrame = 0;