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

mark cox melbournemark+ffmpeg
Fri Oct 19 08:40:03 CEST 2007


On 19/10/2007, aurel <subversion at mplayerhq.hu> wrote:
>
> Author: aurel
> Date: Fri Oct 19 01:21:31 2007
> New Revision: 10800
>
> Log:
> simplify
>
> Modified:
>    trunk/libavformat/electronicarts.c
>
> Modified: trunk/libavformat/electronicarts.c
>
> ==============================================================================
> --- trunk/libavformat/electronicarts.c  (original)
> +++ trunk/libavformat/electronicarts.c  Fri Oct 19 01:21:31 2007
> @@ -36,7 +36,6 @@
> #define MV0F_TAG MKTAG('M', 'V', '0', 'F')
>
> #define EA_BITS_PER_SAMPLE 16
> -#define EA_PREAMBLE_SIZE 8


This change creates a new undocumented constant '8'. Why not keep the
define?
Regards,
mark


typedef struct EaDemuxContext {
>      int big_endian;
> @@ -286,16 +285,12 @@ static int ea_read_packet(AVFormatContex
>      ByteIOContext *pb = &s->pb;
>      int ret = 0;
>      int packet_read = 0;
> -    unsigned char preamble[EA_PREAMBLE_SIZE];
>      unsigned int chunk_type, chunk_size;
>      int key = 0;
>
>      while (!packet_read) {
> -
> -        if (get_buffer(pb, preamble, EA_PREAMBLE_SIZE) !=
> EA_PREAMBLE_SIZE)
> -            return AVERROR(EIO);
> -        chunk_type = AV_RL32(&preamble[0]);
> -        chunk_size = AV_RL32(&preamble[4]) - EA_PREAMBLE_SIZE;
> +        chunk_type = get_le32(pb);
> +        chunk_size = get_le32(pb) - 8;
>
>          switch (chunk_type) {
>          /* audio data */
> _______________________________________________
> 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