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