[FFmpeg-soc] [soc]: r388 - matroska/matroskaenc.c

Baptiste Coudurier baptiste.coudurier at smartjog.com
Fri Jul 13 10:35:56 CEST 2007


Hi

conrad wrote:
> Author: conrad
> Date: Fri Jul 13 06:12:16 2007
> New Revision: 388
> 
> Log:
> Write bit depth for PCM audio
> 
> Modified:
>    matroska/matroskaenc.c
> 
> Modified: matroska/matroskaenc.c
> ==============================================================================
> --- matroska/matroskaenc.c	(original)
> +++ matroska/matroskaenc.c	Fri Jul 13 06:12:16 2007
> @@ -366,6 +366,7 @@ static int mkv_write_tracks(AVFormatCont
>          AVCodecContext *codec = st->codec;
>          offset_t subinfo, track;
>          int native_id = 0;
> +        int bit_depth = 0;
>  
>          track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY);
>          put_ebml_uint (pb, MATROSKA_ID_TRACKNUMBER     , i + 1);
> @@ -384,6 +385,19 @@ static int mkv_write_tracks(AVFormatCont
>              }
>          }
>  
> +        switch (codec->codec_id) {
> +            case CODEC_ID_PCM_S16LE:
> +            case CODEC_ID_PCM_S16BE:
> +            case CODEC_ID_PCM_U16LE:
> +            case CODEC_ID_PCM_U16BE:
> +                bit_depth = 16;
> +                break;
> +            case CODEC_ID_PCM_S8:
> +            case CODEC_ID_PCM_U8:
> +                bit_depth = 8;
> +                break;
> +        }
> +

av_get_bits_per_sample(codec->codec_id)

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312



More information about the FFmpeg-soc mailing list