--- avbin-7.orig/configure.ac
+++ avbin-7/configure.ac
@@ -0,0 +1,31 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.61])
+AC_INIT(avbin, 7.0, Alex.Holkner@gmail.com)
+AM_INIT_AUTOMAKE(avbin, 7.0)
+AC_CONFIG_SRCDIR([include/avbin.h])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_PROG_LIBTOOL
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_INT16_T
+AC_TYPE_INT64_T
+AC_TYPE_SIZE_T
+AC_TYPE_UINT8_T
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+
+AC_OUTPUT
+AC_OUTPUT(Makefile src/Makefile)
--- avbin-7.orig/bootstrap.sh
+++ avbin-7/bootstrap.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+ln -sf /usr/share/aclocal/libtool.m4 aclocal.m4
+libtoolize --force \
+&& autoheader \
+&& aclocal \
+&& automake --add-missing --foreign \
+&& autoconf
--- avbin-7.orig/Makefile.am
+++ avbin-7/Makefile.am
@@ -0,0 +1,2 @@
+AUTOMAKE_OPTIONS = foreign
+SUBDIRS = src
--- avbin-7.orig/debian/copyright
+++ avbin-7/debian/copyright
@@ -0,0 +1,32 @@
+avbin was downloaded from http://code.google.com/p/avbin/downloads/list 
+
+Copyright (c) 2007 Alex Holkner
+
+From avbin/README:
+
+ | Due to the linkage between AVbin and FFmpeg, AVbin must be licensed under the
+ | LGPL or GPL.  Currently all GPL features of the FFmpeg configuration are
+ | disabled, permitting LGPL use.
+
+Thus, the code is licensed under the GNU LGPL:
+
+ | This library is free software; you can redistribute it and/or
+ | modify it under the terms of the GNU Lesser General Public License as
+ | published by the Free Software Foundation; either version 2.1 of
+ | the License, or (at your option) any later version.
+ |
+ | This library is distributed in the hope that it will be useful,
+ | but WITHOUT ANY WARRANTY; without even the implied warranty of
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ | Lesser General Public License for more details.
+ |
+ | You should have received a copy of the GNU General Public License
+ | along with this program; if not, write to the Free Software
+ | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+The Debian packaging is Copyright (c) 2009 Andrew Straw and Matthew Johnson
+and is also distributed under the terms of the GNU LGPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License can be found in `/usr/share/common-licenses/GPL' and the text of the
+GNU Lesser General Public License is in `/usr/share/common-licenses/LGPL'.
--- avbin-7.orig/debian/changelog
+++ avbin-7/debian/changelog
@@ -0,0 +1,44 @@
+avbin (7-1.3.4.201403140124) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Fri, 14 Mar 2014 01:24:42 +0100
+
+avbin (7-1.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/rules:
+    - Replace deprecated dh --after and dh --before calls with overrides
+      (Closes: #666284).
+    - Remove m4 to be able to build twice.
+  * debian/control: Bump debhelper Buil-Dep to 7.0.50~ for overrides support.
+
+ -- Sebastian Ramacher <s.ramacher@gmx.at>  Sun, 08 Apr 2012 19:22:38 +0200
+
+avbin (7-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Remove usage of deprecated APIs to work with Libav >= 0.7. Thanks to
+    Reinhard Tartler for the first part of this. (Closes: #632133)
+
+ -- Stefano Rivera <stefanor@debian.org>  Sat, 03 Mar 2012 18:15:31 +0000
+
+avbin (7-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * port to new libavutil50 log API. (Closes: #591516)
+
+ -- Reinhard Tartler <siretart@tauware.de>  Fri, 18 Feb 2011 20:35:54 +0100
+
+avbin (7-1) unstable; urgency=low
+
+  [ Andrew Straw ]
+  * Initial packaging. (Closes: #523809)
+
+  [ Matthew Johnson ]
+  * Lintian tidyups
+  * Install header and docs
+  * Add watch file
+  * Fix clean target for double-builds 
+
+ -- Matthew Johnson <mjj29@debian.org>  Mon, 04 May 2009 00:24:42 +0100
--- avbin-7.orig/debian/compat
+++ avbin-7/debian/compat
@@ -0,0 +1 @@
+7
--- avbin-7.orig/debian/libavbin0.install
+++ avbin-7/debian/libavbin0.install
@@ -0,0 +1 @@
+usr/lib/libavbin.so.*
--- avbin-7.orig/debian/rules
+++ avbin-7/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+
+override_dh_auto_configure:
+	sh ./bootstrap.sh
+	dh_auto_configure
+
+clean:
+	dh clean
+	rm -rf config.guess config.sub ltmain.sh install-sh missing depcomp aclocal.m4 configure config.h.in Makefile.in src/Makefile.in m4
+
+%:
+	dh $@
--- avbin-7.orig/debian/control
+++ avbin-7/debian/control
@@ -0,0 +1,46 @@
+Source: avbin
+Maintainer: Andrew Straw <strawman@astraw.com>
+Uploaders: Matthew Johnson <mjj29@debian.org>
+Section: utils
+Priority: extra
+Build-Depends: debhelper (>= 7.0.50~),
+               libtool,
+               autoconf,
+               automake,
+               libavutil-dev,
+               libavcodec-dev,
+               libavformat-dev,
+               libswscale-dev
+Standards-Version: 3.8.0
+Homepage: http://code.google.com/p/avbin/
+Vcs-Git: git://github.com/astraw/avbin-debian.git
+Vcs-Browser: http://github.com/astraw/avbin-debian/tree/master
+
+Package: libavbin0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends},
+         ffmpeg
+Description: cross-platform media decoding library
+ AVbin is a thin wrapper around FFmpeg, providing binary compatibility
+ for applications and languages that need it.
+ .
+ FFmpeg is a collection of audio and video codecs widely used in
+ projects such as mplayer, xine, GStreamer and VLC. It is under
+ continuous development; so much so that its developers rarely provide
+ a release, and SVN snapshots of the library must be statically linked
+ to avoid version incompatibilities.
+
+Package: libavbin-dev
+Section: libdevel
+Architecture: any
+Depends: libavbin0 (= ${binary:Version}),
+         ${shlibs:Depends},
+         ${misc:Depends}
+Description: development files for libavbin
+ AVbin is a thin wrapper around FFmpeg, providing binary compatibility
+ for applications and languages that need it.
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libavbin.
--- avbin-7.orig/debian/TODO
+++ avbin-7/debian/TODO
@@ -0,0 +1 @@
+Switch to quilt.
--- avbin-7.orig/debian/libavbin-dev.install
+++ avbin-7/debian/libavbin-dev.install
@@ -0,0 +1,4 @@
+usr/lib/libavbin.a
+usr/lib/libavbin.so
+include/avbin.h usr/include
+doc/html usr/share/doc/libavbin-dev
--- avbin-7.orig/debian/watch
+++ avbin-7/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://code.google.com/p/avbin/ http://avbin.googlecode.com/files/avbin-src-([\d\.]*).tar.gz
--- avbin-7.orig/src/avbin.c
+++ avbin-7/src/avbin.c
@@ -25,9 +25,11 @@
 #include <avbin.h>
 
 /* ffmpeg */
-#include <libavformat/avformat.h>
-#include <libavcodec/avcodec.h>
-#include <libavutil/avutil.h>
+#include <avformat.h>
+#include <avcodec.h>
+#include <avutil.h>
+#include <swscale.h>
+#include <libavutil/dict.h>
 
 struct _AVbinFile {
     AVFormatContext *context;
@@ -42,6 +44,7 @@
 };
 
 static AVbinLogCallback user_log_callback = NULL;
+static int av_log_level;
 
 /**
  * Format log messages and call the user log callback.  Essentially a
@@ -91,7 +94,8 @@
 AVbinResult avbin_init()
 {
     avcodec_init();
-    av_register_all();    
+    av_register_all();
+    av_log_level = av_log_get_level();
     return AVBIN_RESULT_OK;
 }
 
@@ -119,7 +123,8 @@
 AVbinFile *avbin_open_filename(const char *filename)
 {
     AVbinFile *file = malloc(sizeof *file);
-    if (av_open_input_file(&file->context, filename, NULL, 0, NULL) != 0)
+    file->context = avformat_alloc_context();
+    if (avformat_open_input(&file->context, filename, NULL, NULL) < 0)
         goto error;
 
     if (av_find_stream_info(file->context) < 0)
@@ -165,20 +170,46 @@
 
 AVbinResult avbin_file_info(AVbinFile *file, AVbinFileInfo *info)
 {
+    AVDictionaryEntry *result;
+
     if (info->structure_size < sizeof *info)
         return AVBIN_RESULT_ERROR;
 
     info->n_streams = file->context->nb_streams;
     info->start_time = file->context->start_time;
     info->duration = file->context->duration;
-    memcpy(info->title, file->context->title, sizeof(info->title));
-    memcpy(info->author, file->context->author, sizeof(info->author));
-    memcpy(info->copyright, file->context->copyright, sizeof(info->copyright));
-    memcpy(info->comment, file->context->comment, sizeof(info->comment));
-    memcpy(info->album, file->context->album, sizeof(info->album));
-    info->year = file->context->year;
-    info->track = file->context->track;
-    memcpy(info->genre, file->context->genre, sizeof(info->genre));
+
+    result = av_dict_get(file->context->metadata, "title", NULL, 0);
+    if (result)
+        strncpy(info->title, result->value, sizeof(info->title));
+
+    result = av_dict_get(file->context->metadata, "artist", NULL, 0);
+    if (result)
+        strncpy(info->author, result->value, sizeof(info->author));
+
+    result = av_dict_get(file->context->metadata, "copyright", NULL, 0);
+    if (result)
+        strncpy(info->copyright, result->value, sizeof(info->copyright));
+
+    result = av_dict_get(file->context->metadata, "comment", NULL, 0);
+    if (result)
+        strncpy(info->comment, result->value, sizeof(info->comment));
+
+    result = av_dict_get(file->context->metadata, "album", NULL, 0);
+    if (result)
+        strncpy(info->album, result->value, sizeof(info->album));
+
+    result = av_dict_get(file->context->metadata, "year", NULL, 0);
+    if (result)
+        info->year = strtol(result->value, NULL, 10);
+
+    result = av_dict_get(file->context->metadata, "track", NULL, 0);
+    if (result)
+        info->track = strtol(result->value, NULL, 10);
+
+    result = av_dict_get(file->context->metadata, "genre", NULL, 0);
+    if (result)
+        strncpy(info->genre, result->value, sizeof(info->genre));
 
     return AVBIN_RESULT_OK;
 }
@@ -194,14 +225,14 @@
 
     switch (context->codec_type)
     {
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             info->type = AVBIN_STREAM_TYPE_VIDEO;
             info->video.width = context->width;
             info->video.height = context->height;
             info->video.sample_aspect_num = context->sample_aspect_ratio.num;
             info->video.sample_aspect_den = context->sample_aspect_ratio.den;
             break;
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             info->type = AVBIN_STREAM_TYPE_AUDIO;
             info->audio.sample_rate = context->sample_rate;
             info->audio.channels = context->channels;
@@ -215,10 +246,6 @@
                     info->audio.sample_format = AVBIN_SAMPLE_FORMAT_S16;
                     info->audio.sample_bits = 16;
                     break;
-                case SAMPLE_FMT_S24:
-                    info->audio.sample_format = AVBIN_SAMPLE_FORMAT_S24;
-                    info->audio.sample_bits = 24;
-                    break;
                 case SAMPLE_FMT_S32:
                     info->audio.sample_format = AVBIN_SAMPLE_FORMAT_S32;
                     info->audio.sample_bits = 32;
@@ -257,7 +284,7 @@
     stream->format_context = file->context;
     stream->codec_context = codec_context;
     stream->type = codec_context->codec_type;
-    if (stream->type == CODEC_TYPE_VIDEO)
+    if (stream->type == AVMEDIA_TYPE_VIDEO)
         stream->frame = avcodec_alloc_frame();
     else
         stream->frame = NULL;
@@ -299,12 +326,16 @@
                        uint8_t *data_out, int *size_out)
 {
     int used;
-    if (stream->type != CODEC_TYPE_AUDIO)
+    if (stream->type != AVMEDIA_TYPE_AUDIO)
         return AVBIN_RESULT_ERROR;
 
-    used = avcodec_decode_audio2(stream->codec_context, 
+    AVPacket avpkt;
+    av_init_packet(&avpkt);
+    avpkt.data = data_in;
+    avpkt.size = size_in;
+    used = avcodec_decode_audio3(stream->codec_context, 
                                  (int16_t *) data_out, size_out,
-                                 data_in, size_in);
+                                 &avpkt);
 
     if (used < 0)
         return AVBIN_RESULT_ERROR;
@@ -322,25 +353,45 @@
     int height = stream->codec_context->height;
     int used;
 
-    if (stream->type != CODEC_TYPE_VIDEO)
+    if (stream->type != AVMEDIA_TYPE_VIDEO)
         return AVBIN_RESULT_ERROR;
 
-    used = avcodec_decode_video(stream->codec_context, 
-                                stream->frame, &got_picture,
-                                data_in, size_in);
+    AVPacket avpkt;
+    av_init_packet(&avpkt);
+    avpkt.data = data_in;
+    avpkt.size = size_in;
+    // HACK for CorePNG to decode as normal PNG by default
+    avpkt.flags = AV_PKT_FLAG_KEY;
+    used = avcodec_decode_video2(stream->codec_context, 
+                                 stream->frame, &got_picture,
+                                 &avpkt);
     if (!got_picture)
         return AVBIN_RESULT_ERROR;
 
 
     avpicture_fill(&picture_rgb, data_out, PIX_FMT_RGB24, width, height);
 
-    /* img_convert is marked deprecated in favour of swscale, don't
-     * be surprised if this stops working the next time the ffmpeg version
-     * is pushed.  Example use of the new API is in ffplay.c. */
-    img_convert(&picture_rgb, PIX_FMT_RGB24, 
-                (AVPicture *) stream->frame, stream->codec_context->pix_fmt,
-                width, height);
+    static int sws_flags = SWS_BICUBIC;
+    static struct SwsContext *img_convert_ctx;
     
+    img_convert_ctx = sws_getContext(    width, 
+					 height,
+					 stream->codec_context->pix_fmt,
+					 width, 
+					 height,
+					 PIX_FMT_RGB24,
+					 sws_flags, NULL, NULL, NULL);
+    
+    sws_scale(   img_convert_ctx, 
+		 stream->frame->data, 
+		 stream->frame->linesize,
+		 0, 
+		 height,
+		 picture_rgb.data,
+		 picture_rgb.linesize);
+
+    sws_freeContext(img_convert_ctx);
+
     return used;
 }
 
--- avbin-7.orig/src/Makefile.am
+++ avbin-7/src/Makefile.am
@@ -0,0 +1,10 @@
+# See http://sourceware.org/autobook/autobook/autobook_88.html
+c_sources = avbin.c
+
+INCLUDES = -I$(top_srcdir) -I../include -I/usr/include/libavformat -I/usr/include/libavcodec -I/usr/include/libavutil -I/usr/include/libswscale -I/usr/include/ffmpeg
+
+lib_LTLIBRARIES= libavbin.la
+libavbin_la_SOURCES= $(c_sources)
+libavbin_la_CFLAGS= -DAVBIN_VERSION=7 -DFFMPEG_REVISION=15943
+libavbin_la_LDFLAGS= -version-info 0:7:0
+libavbin_la_LIBADD= -lavutil -lavcodec -lavformat -lswscale
