void-packages/srcpkgs/handbrake/patches/remove-dvdnav-dup.patch
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: convert patches to -Np1
```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
809 B
Diff

--- a/libhb/dvdnav.c
+++ b/libhb/dvdnav.c
@@ -1225,16 +1225,7 @@
{
for (kk = 0; kk < buttons; kk++)
{
- dvdnav_t *dvdnav_copy;
-
- result = dvdnav_dup( &dvdnav_copy, d->dvdnav );
- if (result != DVDNAV_STATUS_OK)
- {
- hb_log("dvdnav dup failed: %s", dvdnav_err_to_string(d->dvdnav));
- goto done;
- }
- title = try_button( dvdnav_copy, kk, list_title );
- dvdnav_free_dup( dvdnav_copy );
+ title = try_button( d->dvdnav, kk, list_title );
if ( title >= 0 )
{