1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../vdr-softdevice/hotfix-ffmpeg.patch
5 # Copyright (C) 2008 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
18 CHANGELOG configure mpeg2decoder.c
20 Fix build failure with newer ffmpeg releases (bug #14494).
23 ===================================================================
24 RCS file: /cvsroot/softdevice/softdevice/CHANGELOG,v
25 retrieving revision 1.341
26 retrieving revision 1.342
27 diff -C2 -d -r1.341 -r1.342
28 *** ./CHANGELOG 12 Sep 2008 16:48:58 -0000 1.341
29 --- ./CHANGELOG 21 Sep 2008 12:55:57 -0000 1.342
35 + - build: Fix build failure with newer ffmpeg releases (bug #14494).
37 - OSD: next fix in subtitle vs. OSD behaviour issues.
40 ===================================================================
41 RCS file: /cvsroot/softdevice/softdevice/configure,v
42 retrieving revision 1.49
43 retrieving revision 1.50
44 diff -C2 -d -r1.49 -r1.50
45 *** ./configure 14 Jul 2008 17:03:03 -0000 1.49
46 --- ./configure 21 Sep 2008 12:55:57 -0000 1.50
51 ########################################################
52 + echo -n "Checking ffmpeg for member of AVCodecContext: error_recognition ... "
53 + echo "Checking ffmpeg for member of AVCodecContext: error_recognition ----" >> config.log
55 + test_error_recognition()
57 + has_error_recognition="yes";
58 + cat > ${TMPC} << EOF
59 + #define __STDC_CONSTANT_MACROS
62 + #include <libavcodec/avcodec.h>
63 + #include <libavformat/avformat.h>
64 + #include <libswscale/swscale.h>
67 + AVCodecContext *context;
69 + if (context -> error_recognition)
74 + $cc $CFLAGS $ffmpeg_cflags $swscale_cflags -o $TMPE $TMPC $swscale_libs $ffmpeg_libs >> config.log 2>&1 || has_error_recognition="no"
78 + ########################################################
79 + # check for error_recognition
80 + test_error_recognition
81 + if test "${has_error_recognition}" = "yes" ; then
82 + echo " 'error_recognition' found"
84 + echo " 'error_recognition' NOT found"
88 + ########################################################
90 echo -n "Checking for ALSA sound... "
94 if test "${swscale}" = "yes"; then
95 echo "#define USE_SWSCALE" >> $TMPH
98 + if test "${has_error_recognition}" = "yes" ; then
99 + echo "#define HAS_ERROR_RECOGNITION 1" >> $TMPH
101 + echo "#define HAS_ERROR_RECOGNITION 0" >> $TMPH
105 Index: mpeg2decoder.c
106 ===================================================================
107 RCS file: /cvsroot/softdevice/softdevice/mpeg2decoder.c,v
108 retrieving revision 1.83
109 retrieving revision 1.84
110 diff -C2 -d -r1.83 -r1.84
111 *** ./mpeg2decoder.c 20 Jul 2008 16:41:01 -0000 1.83
112 --- ./mpeg2decoder.c 21 Sep 2008 12:55:57 -0000 1.84
118 + #if HAS_ERROR_RECOGNITION
119 + context->error_recognition=1;
121 context->error_resilience=1;
123 CMDDEB("Neuer StreamDecoder Pid: %d context %p type %d\n",
124 getpid(),context,context->codec_type );
127 cMpeg2Decoder::cMpeg2Decoder(cAudioOut *AudioOut, cVideoOut *VideoOut)
129 if ( avcodec_build() != LIBAVCODEC_BUILD ) {
130 ! fprintf(stderr,"Fatal Error! Libavcodec library build(%d) doesn't match avcodec.h build(%d)!!!\n",avcodec_build(),LIBAVCODEC_BUILD);
131 fprintf(stderr,"Check your ffmpeg installation / the pathes in the Makefile!!!\n");
134 cMpeg2Decoder::cMpeg2Decoder(cAudioOut *AudioOut, cVideoOut *VideoOut)
136 + #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
137 if ( avcodec_build() != LIBAVCODEC_BUILD ) {
139 ! "Fatal Error! Libavcodec library build(%d) doesn't "
140 ! "match avcodec.h build(%d)!!!\n",
141 ! avcodec_build(), LIBAVCODEC_BUILD);
143 ! if ( avcodec_version() != LIBAVCODEC_VERSION_INT ) {
145 ! "Fatal Error! Libavcodec library build(%d) doesn't "
146 ! "match avcodec.h build(%d)!!!\n",
147 ! avcodec_version(), LIBAVCODEC_VERSION_INT);
149 fprintf(stderr,"Check your ffmpeg installation / the pathes in the Makefile!!!\n");