[vlc-devel] commit: Use picture helpers. (Laurent Aimar )

git version control git at videolan.org
Fri Jul 18 21:33:33 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Jul 18 21:35:44 2008 +0200| [4e6bc3609e9a346b87faaaddf77ed382451e8e6c]

Use picture helpers.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e6bc3609e9a346b87faaaddf77ed382451e8e6c
---

 modules/codec/avcodec/deinterlace.c |    9 +++------
 modules/codec/fake.c                |    8 ++++----
 modules/codec/subtitles/subsdec.c   |    2 +-
 modules/codec/subtitles/subsusf.c   |    2 +-
 4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/modules/codec/avcodec/deinterlace.c b/modules/codec/avcodec/deinterlace.c
index 0d6f07d..f44289a 100644
--- a/modules/codec/avcodec/deinterlace.c
+++ b/modules/codec/avcodec/deinterlace.c
@@ -147,12 +147,9 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
         p_filter->pf_vout_buffer_del( p_filter, p_pic_dst );
         return NULL;
     }
-    p_pic_dst->date = p_pic->date;
-    p_pic_dst->b_force = p_pic->b_force;
-    p_pic_dst->i_nb_fields = p_pic->i_nb_fields;
-    p_pic_dst->b_progressive = true;
-    p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
 
-    p_pic->pf_release( p_pic );
+    picture_CopyProperties( p_pic_dst, p_pic );
+    p_pic_dst->b_progressive = true;
+    picture_Release( p_pic );
     return p_pic_dst;
 }
diff --git a/modules/codec/fake.c b/modules/codec/fake.c
index 6c47a52..7696a76 100644
--- a/modules/codec/fake.c
+++ b/modules/codec/fake.c
@@ -277,7 +277,7 @@ static int OpenDecoder( vlc_object_t *p_this )
             }
             else
             {
-                p_old->pf_release( p_old );
+                picture_Release( p_old );
             }
         }
     }
@@ -314,7 +314,7 @@ static int OpenDecoder( vlc_object_t *p_this )
         }
         else
         {
-            p_old->pf_release( p_old );
+            picture_Release( p_old );
         }
     }
 
@@ -376,7 +376,7 @@ static void CloseDecoder( vlc_object_t *p_this )
     picture_t *p_image = p_dec->p_sys->p_image;
 
     if( p_image != NULL )
-        p_image->pf_release( p_image );
+        picture_Release( p_image );
 
     vlc_mutex_destroy( &p_dec->p_sys->lock );
     free( p_dec->p_sys );
@@ -425,7 +425,7 @@ static int FakeCallback( vlc_object_t *p_this, char const *psz_var,
         }
 
         p_dec->p_sys->p_image = p_new_image;
-        p_image->pf_release( p_image );
+        picture_Release( p_image );
         vlc_mutex_unlock( &p_dec->p_sys->lock );
     }
     else if( !strcmp( psz_var, "fake-file-reload" ) )
diff --git a/modules/codec/subtitles/subsdec.c b/modules/codec/subtitles/subsdec.c
index 5d4aaf2..851a3b3 100644
--- a/modules/codec/subtitles/subsdec.c
+++ b/modules/codec/subtitles/subsdec.c
@@ -298,7 +298,7 @@ static void CloseDecoder( vlc_object_t *p_this )
                 continue;
 
             if( p_sys->pp_images[i]->p_pic )
-                p_sys->pp_images[i]->p_pic->pf_release( p_sys->pp_images[i]->p_pic );
+                picture_Release( p_sys->pp_images[i]->p_pic );
             free( p_sys->pp_images[i]->psz_filename );
 
             free( p_sys->pp_images[i] );
diff --git a/modules/codec/subtitles/subsusf.c b/modules/codec/subtitles/subsusf.c
index 162cd1d..5d9621d 100644
--- a/modules/codec/subtitles/subsusf.c
+++ b/modules/codec/subtitles/subsusf.c
@@ -161,7 +161,7 @@ static void CloseDecoder( vlc_object_t *p_this )
                 continue;
 
             if( p_sys->pp_images[i]->p_pic )
-                p_sys->pp_images[i]->p_pic->pf_release( p_sys->pp_images[i]->p_pic );
+                picture_Release( p_sys->pp_images[i] );
             free( p_sys->pp_images[i]->psz_filename );
 
             free( p_sys->pp_images[i] );




More information about the vlc-devel mailing list