Browse Source

define FLAC metadata types in flac.h

Originally committed as revision 16765 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Justin Ruggles 16 years ago
parent
commit
d38b88213e
2 changed files with 12 additions and 3 deletions
  1. +11
    -0
      libavcodec/flac.h
  2. +1
    -3
      libavcodec/flacdec.c

+ 11
- 0
libavcodec/flac.h View File

@@ -29,6 +29,17 @@

#include "avcodec.h"

enum {
FLAC_METADATA_TYPE_STREAMINFO = 0,
FLAC_METADATA_TYPE_PADDING,
FLAC_METADATA_TYPE_APPLICATION,
FLAC_METADATA_TYPE_SEEKTABLE,
FLAC_METADATA_TYPE_VORBIS_COMMENT,
FLAC_METADATA_TYPE_CUESHEET,
FLAC_METADATA_TYPE_PICTURE,
FLAC_METADATA_TYPE_INVALID = 127
};

/**
* Data needed from the Streaminfo header for use by the raw FLAC demuxer
* and/or the FLAC decoder.


+ 1
- 3
libavcodec/flacdec.c View File

@@ -73,8 +73,6 @@ typedef struct FLACContext {
unsigned int allocated_bitstream_size;
} FLACContext;

#define METADATA_TYPE_STREAMINFO 0

static const int sample_rate_table[] =
{ 0,
88200, 176400, 192000,
@@ -207,7 +205,7 @@ static int metadata_parse(FLACContext *s)

if (metadata_size) {
switch (metadata_type) {
case METADATA_TYPE_STREAMINFO:
case FLAC_METADATA_TYPE_STREAMINFO:
ff_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s,
s->gb.buffer+get_bits_count(&s->gb)/8);
streaminfo_updated = 1;


Loading…
Cancel
Save