[FFmpeg-cvslog] r10802 - trunk/libavformat/electronicarts.c

mark cox melbournemark+ffmpeg
Fri Oct 19 08:07:27 CEST 2007


What is the point of this change?
I think it looked more readable before.
Regards,
mark


On 19/10/2007, aurel <subversion at mplayerhq.hu> wrote:
>
> Author: aurel
> Date: Fri Oct 19 01:36:12 2007
> New Revision: 10802
>
> Log:
> set bytes per sample in the context
>
> Modified:
>    trunk/libavformat/electronicarts.c
>
> Modified: trunk/libavformat/electronicarts.c
>
> ==============================================================================
> --- trunk/libavformat/electronicarts.c  (original)
> +++ trunk/libavformat/electronicarts.c  Fri Oct 19 01:36:12 2007
> @@ -35,8 +35,6 @@
> #define MV0K_TAG MKTAG('M', 'V', '0', 'K')
> #define MV0F_TAG MKTAG('M', 'V', '0', 'F')
>
> -#define EA_BITS_PER_SAMPLE 16
> -
> typedef struct EaDemuxContext {
>      int big_endian;
>
> @@ -50,6 +48,7 @@ typedef struct EaDemuxContext {
>
>      int64_t audio_pts;
>
> +    int bytes;
>      int sample_rate;
>      int num_channels;
>      int num_samples;
> @@ -83,6 +82,7 @@ static int process_audio_header_elements
>      ByteIOContext *pb = &s->pb;
>      int compression_type = -1, revision = -1;
>
> +    ea->bytes = 2;
>      ea->sample_rate = -1;
>      ea->num_channels = 1;
>
> @@ -267,7 +267,7 @@ static int ea_read_header(AVFormatContex
>      st->codec->codec_tag = 0;  /* no tag */
>      st->codec->channels = ea->num_channels;
>      st->codec->sample_rate = ea->sample_rate;
> -    st->codec->bits_per_sample = EA_BITS_PER_SAMPLE;
> +    st->codec->bits_per_sample = ea->bytes * 8;
>      st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
>          st->codec->bits_per_sample / 4;
>      st->codec->block_align = st->codec->channels *
> st->codec->bits_per_sample;
> _______________________________________________
> ffmpeg-cvslog mailing list
> ffmpeg-cvslog at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-cvslog
>
>




More information about the ffmpeg-cvslog mailing list