* updated korganizer (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / contrib / dfb-extra / libmpeg3-mpeg3_open.patch
blobe85ce2761b374551b13ea8735566f1654e9c6d93
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../dfb-extra/libmpeg3-mpeg3_open.patch
5 # Copyright (C) 2006 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
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
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 libmpeg3 API change since version 1.7
19 --- DirectFB-extra-0.9.25/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_libmpeg3.c.orig 2006-02-26 22:38:13.000000000 +0100
20 +++ DirectFB-extra-0.9.25/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_libmpeg3.c 2006-09-14 14:03:25.000000000 +0200
21 @@ -1051,6 +1051,7 @@
23 mpeg3_t *q;
24 char *filename;
25 + int mpeg3_error;
27 if (!ctx->filename)
28 return DFB_UNSUPPORTED;
29 @@ -1062,8 +1063,9 @@
30 return DFB_UNSUPPORTED;
33 - q = mpeg3_open( filename );
34 - if (!q) {
35 + q = mpeg3_open( filename, &mpeg3_error );
36 + if (!q || mpeg3_error) {
37 + D_ERROR( "Libmpeg3 Provider: Error opening the video file (%d)!\n", mpeg3_error );
38 D_FREE( filename );
39 return DFB_UNSUPPORTED;
41 @@ -1084,7 +1086,7 @@
42 static DFBResult
43 Construct( IDirectFBVideoProvider *thiz, IDirectFBDataBuffer *buffer )
45 - int i;
46 + int i, mpeg3_error;
47 IDirectFBDataBuffer_data *buffer_data;
49 DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBVideoProvider_Libmpeg3)
50 @@ -1103,7 +1105,7 @@
53 /* open mpeg3 file */
54 - data->file = mpeg3_open( data->filename );
55 + data->file = mpeg3_open( data->filename, &mpeg3_error );
57 /* fetch information about video */
58 data->video.width = mpeg3_video_width( data->file, 0 );