Ticket #29176: 29176.diff
File 29176.diff, 1.5 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/media.php
2860 2860 foreach ( array( 'id3v2', 'id3v1' ) as $version ) { 2861 2861 if ( ! empty( $data[$version]['comments'] ) ) { 2862 2862 foreach ( $data[$version]['comments'] as $key => $list ) { 2863 if ( ! empty( $list ) ) {2863 if ( 'length' !== $key && ! empty( $list ) ) { 2864 2864 $metadata[$key] = reset( $list ); 2865 2865 // Fix bug in byte stream analysis. 2866 2866 if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) ) … … 2922 2922 if ( ! empty( $data['mime_type'] ) ) 2923 2923 $metadata['mime_type'] = $data['mime_type']; 2924 2924 if ( ! empty( $data['playtime_seconds'] ) ) 2925 $metadata['length'] = (int) ceil( $data['playtime_seconds'] );2925 $metadata['length'] = (int) round( $data['playtime_seconds'] ); 2926 2926 if ( ! empty( $data['playtime_string'] ) ) 2927 2927 $metadata['length_formatted'] = $data['playtime_string']; 2928 2928 if ( ! empty( $data['video']['resolution_x'] ) ) … … 2978 2978 if ( ! empty( $data['mime_type'] ) ) 2979 2979 $metadata['mime_type'] = $data['mime_type']; 2980 2980 if ( ! empty( $data['playtime_seconds'] ) ) 2981 $metadata['length'] = (int) ceil( $data['playtime_seconds'] );2981 $metadata['length'] = (int) round( $data['playtime_seconds'] ); 2982 2982 if ( ! empty( $data['playtime_string'] ) ) 2983 2983 $metadata['length_formatted'] = $data['playtime_string']; 2984 2984