diff options
author | Wout Mertens <Wout.Mertens@gmail.com> | 2014-05-04 01:34:24 +0200 |
---|---|---|
committer | Wout Mertens <Wout.Mertens@gmail.com> | 2014-05-04 01:56:48 +0200 |
commit | ccb065a08cf06a77e7861d6e855fa953b9daef2b (patch) | |
tree | 7eb503fef39b2d816a5e30ea1e12e0404f26c51a /pkgs/development/libraries/libmpeg2 | |
parent | c02f80375f9bcc550f3e8b530262c85e585e516a (diff) | |
download | nixpkgs-ccb065a08cf06a77e7861d6e855fa953b9daef2b.tar nixpkgs-ccb065a08cf06a77e7861d6e855fa953b9daef2b.tar.gz nixpkgs-ccb065a08cf06a77e7861d6e855fa953b9daef2b.tar.bz2 nixpkgs-ccb065a08cf06a77e7861d6e855fa953b9daef2b.tar.lz nixpkgs-ccb065a08cf06a77e7861d6e855fa953b9daef2b.tar.xz nixpkgs-ccb065a08cf06a77e7861d6e855fa953b9daef2b.tar.zst nixpkgs-ccb065a08cf06a77e7861d6e855fa953b9daef2b.zip |
libmpeg2: Add patches from Handbrake project
libmpeg2 is abandoned upstream. Patches: - A00: Fix tag handling on frames
Diffstat (limited to 'pkgs/development/libraries/libmpeg2')
-rw-r--r-- | pkgs/development/libraries/libmpeg2/A00-tags.patch | 27 | ||||
-rw-r--r-- | pkgs/development/libraries/libmpeg2/default.nix | 7 |
2 files changed, 33 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libmpeg2/A00-tags.patch b/pkgs/development/libraries/libmpeg2/A00-tags.patch new file mode 100644 index 00000000000..0b5d7d7da12 --- /dev/null +++ b/pkgs/development/libraries/libmpeg2/A00-tags.patch @@ -0,0 +1,27 @@ +diff -ru mpeg2dec.orig/libmpeg2/decode.c mpeg2dec/libmpeg2/decode.c +--- mpeg2dec.orig/libmpeg2/decode.c 2008-07-09 12:16:05.000000000 -0700 ++++ mpeg2dec/libmpeg2/decode.c 2009-07-03 16:29:48.000000000 -0700 +@@ -212,7 +212,7 @@ + + mpeg2_state_t mpeg2_parse_header (mpeg2dec_t * mpeg2dec) + { +- static int (* process_header[]) (mpeg2dec_t * mpeg2dec) = { ++ static int (* process_header[]) (mpeg2dec_t *) = { + mpeg2_header_picture, mpeg2_header_extension, mpeg2_header_user_data, + mpeg2_header_sequence, NULL, NULL, NULL, NULL, mpeg2_header_gop + }; +@@ -368,6 +368,14 @@ + + void mpeg2_tag_picture (mpeg2dec_t * mpeg2dec, uint32_t tag, uint32_t tag2) + { ++ if (mpeg2dec->num_tags == 0 && mpeg2dec->state == STATE_PICTURE && mpeg2dec->picture) { ++ // since tags got processed when we entered this state we ++ // have to set them directly or they'll end up on the next frame. ++ mpeg2dec->picture->tag = tag; ++ mpeg2dec->picture->tag2 = tag2; ++ mpeg2dec->picture->flags |= PIC_FLAG_TAGS; ++ return; ++ } + mpeg2dec->tag_previous = mpeg2dec->tag_current; + mpeg2dec->tag2_previous = mpeg2dec->tag2_current; + mpeg2dec->tag_current = tag; diff --git a/pkgs/development/libraries/libmpeg2/default.nix b/pkgs/development/libraries/libmpeg2/default.nix index 1d04eea89f6..e651a932efe 100644 --- a/pkgs/development/libraries/libmpeg2/default.nix +++ b/pkgs/development/libraries/libmpeg2/default.nix @@ -1,13 +1,18 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "libmpeg2-0.5.1"; + name = "libmpeg2-0.5.1p4"; src = fetchurl { url = "http://libmpeg2.sourceforge.net/files/${name}.tar.gz"; sha256 = "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"; }; + # From Handbrake - Project seems unmaintained + patches = [ + ./A00-tags.patch + ]; + meta = { homepage = http://libmpeg2.sourceforge.net/; description = "A free library for decoding mpeg-2 and mpeg-1 video streams"; |