]> git.sesse.net Git - vlc/blobdiff - src/misc/es_format.c
secstotimestr: use int32_t not to overflow if int exceeds 32-bits
[vlc] / src / misc / es_format.c
index ab1e43a6c10d5c91d202d5a7e45c7bf5ed884271..cad689af8f8267c107e1aed2959e9ea9c1832509 100644 (file)
@@ -142,11 +142,6 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
     p_fmt->i_y_offset       = 0;
     vlc_ureduce( &p_fmt->i_sar_num, &p_fmt->i_sar_den,
                  i_sar_num, i_sar_den, 0 );
-    if( p_fmt->i_sar_den > 0 && i_height > 0 )
-        p_fmt->i_aspect     = (int64_t)p_fmt->i_sar_num * i_width * VOUT_ASPECT_FACTOR /
-                              p_fmt->i_sar_den / i_height;
-    else
-        p_fmt->i_aspect     = 0;
 
     switch( p_fmt->i_chroma )
     {
@@ -175,6 +170,7 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
     case VLC_CODEC_J420:
         p_fmt->i_bits_per_pixel = 12;
         break;
+    case VLC_CODEC_YV9:
     case VLC_CODEC_I410:
         p_fmt->i_bits_per_pixel = 9;
         break;
@@ -246,6 +242,8 @@ void es_format_Init( es_format_t *fmt,
     fmt->i_cat                  = i_cat;
     fmt->i_codec                = i_codec;
     fmt->i_original_fourcc      = 0;
+    fmt->i_profile              = -1;
+    fmt->i_level                = -1;
     fmt->i_id                   = -1;
     fmt->i_group                = 0;
     fmt->i_priority             = 0;