Make WordPress Core

Ticket #29176: 29176.diff

File 29176.diff, 1.5 KB (added by wonderboymusic, 11 years ago)
  • src/wp-admin/includes/media.php

     
    28602860        foreach ( array( 'id3v2', 'id3v1' ) as $version ) {
    28612861                if ( ! empty( $data[$version]['comments'] ) ) {
    28622862                        foreach ( $data[$version]['comments'] as $key => $list ) {
    2863                                 if ( ! empty( $list ) ) {
     2863                                if ( 'length' !== $key && ! empty( $list ) ) {
    28642864                                        $metadata[$key] = reset( $list );
    28652865                                        // Fix bug in byte stream analysis.
    28662866                                        if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
     
    29222922        if ( ! empty( $data['mime_type'] ) )
    29232923                $metadata['mime_type'] = $data['mime_type'];
    29242924        if ( ! empty( $data['playtime_seconds'] ) )
    2925                 $metadata['length'] = (int) ceil( $data['playtime_seconds'] );
     2925                $metadata['length'] = (int) round( $data['playtime_seconds'] );
    29262926        if ( ! empty( $data['playtime_string'] ) )
    29272927                $metadata['length_formatted'] = $data['playtime_string'];
    29282928        if ( ! empty( $data['video']['resolution_x'] ) )
     
    29782978        if ( ! empty( $data['mime_type'] ) )
    29792979                $metadata['mime_type'] = $data['mime_type'];
    29802980        if ( ! empty( $data['playtime_seconds'] ) )
    2981                 $metadata['length'] = (int) ceil( $data['playtime_seconds'] );
     2981                $metadata['length'] = (int) round( $data['playtime_seconds'] );
    29822982        if ( ! empty( $data['playtime_string'] ) )
    29832983                $metadata['length_formatted'] = $data['playtime_string'];
    29842984