]> git.sesse.net Git - vlc/commitdiff
* MPNG support
authorDerk-Jan Hartman <hartman@videolan.org>
Thu, 29 Jun 2006 20:52:30 +0000 (20:52 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Thu, 29 Jun 2006 20:52:30 +0000 (20:52 +0000)
modules/codec/png.c

index 0e7b108b5ef1397eaa35c30d441d16eb5960d909..2c13d0219771eaf7e477e90bffc154176c50b06a 100644 (file)
@@ -65,7 +65,8 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('p','n','g',' ') )
+    if( p_dec->fmt_in.i_codec != VLC_FOURCC('p','n','g',' ') &&
+        p_dec->fmt_in.i_codec != VLC_FOURCC('M','P','N','G') )
     {
         return VLC_EGENERIC;
     }
@@ -222,6 +223,8 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     png_destroy_read_struct( &p_png, &p_info, &p_end_info );
     free( p_row_pointers );
 
+    p_pic->date = p_block->i_pts > 0 ? p_block->i_pts : p_block->i_dts;
+
     block_Release( p_block ); *pp_block = NULL;
     return p_pic;