]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/scale.c
RTP: avoid loosing the first received packet
[vlc] / modules / video_filter / scale.c
index 690e1457d3e79b3f95a6a0c20148513d99d52fef..53503ee7986c0508276c8a83f42ba1c0eb0a22ee 100644 (file)
@@ -30,7 +30,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_vout.h>
 #include "vlc_filter.h"
 
@@ -55,10 +56,8 @@ static picture_t *Filter( filter_t *, picture_t * );
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("Video scaling filter") );
-    set_capability( "video filter2", 10000 );
-//    set_category( CAT_VIDEO );
-//    set_subcategory( SUBCAT_VIDEO_VFILTER2 );
+    set_description( N_("Video scaling filter") );
+    set_capability( "video filter2", 10 );
     set_callbacks( OpenFilter, CloseFilter );
 vlc_module_end();
 
@@ -83,10 +82,7 @@ static int OpenFilter( vlc_object_t *p_this )
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_filter->p_sys = p_sys =
           (filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL )
-    {
-        msg_Err( p_filter, "out of memory" );
-        return VLC_EGENERIC;
-    }
+        return VLC_ENOMEM;
 
     p_filter->pf_video_filter = Filter;
 
@@ -233,6 +229,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     p_pic_dst->b_progressive = p_pic->b_progressive;
     p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
 
-    p_pic->pf_release( p_pic );
+    if( p_pic->pf_release )
+        p_pic->pf_release( p_pic );
     return p_pic_dst;
 }