]> git.pld-linux.org Git - packages/DirectFB.git/blob - DirectFB-libmpeg3.patch
Release 6 (by relup.sh)
[packages/DirectFB.git] / DirectFB-libmpeg3.patch
1 --- DirectFB-extra-1.0.0.orig/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_libmpeg3.c       2006-11-23 00:42:47.000000000 +0100
2 +++ DirectFB-extra-1.0.0/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_libmpeg3.c    2007-03-09 10:40:28.000000000 +0100
3 @@ -1051,6 +1051,7 @@
4  {
5       mpeg3_t *q;
6       char    *filename;
7 +     int     error_code;
8       
9       if (!ctx->filename)
10            return DFB_UNSUPPORTED;
11 @@ -1062,8 +1063,9 @@
12            return DFB_UNSUPPORTED;
13       }
14  
15 -     q = mpeg3_open( filename );
16 -     if (!q) {
17 +     q = mpeg3_open( filename, &error_code );
18 +     if (!q || error_code) {
19 +          D_ERROR( "Libmpeg3 Provider: Error opening video file!\n" );
20            D_FREE( filename );
21            return DFB_UNSUPPORTED;
22       }
23 @@ -1084,7 +1086,7 @@
24  static DFBResult
25  Construct( IDirectFBVideoProvider *thiz, IDirectFBDataBuffer *buffer )
26  {
27 -     int i;
28 +     int i, error_code;
29       IDirectFBDataBuffer_data *buffer_data;
30  
31       DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBVideoProvider_Libmpeg3)
32 @@ -1103,7 +1105,7 @@
33  
34  
35       /* open mpeg3 file */
36 -     data->file          = mpeg3_open( data->filename );
37 +     data->file          = mpeg3_open( data->filename, &error_code );
38  
39       /* fetch information about video */
40       data->video.width   = mpeg3_video_width( data->file, 0 );
This page took 0.031416 seconds and 3 git commands to generate.