Browse Source

lavf/apetag: move common stuff between writer and reader to single file

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n1.0
Paul B Mahol 13 years ago
parent
commit
e4f3a9693d
3 changed files with 5 additions and 7 deletions
  1. +1
    -3
      libavformat/apetag.c
  2. +4
    -0
      libavformat/apetag.h
  3. +0
    -4
      libavformat/apetagenc.c

+ 1
- 3
libavformat/apetag.c View File

@@ -26,8 +26,6 @@
#include "apetag.h"
#include "internal.h"

#define APE_TAG_VERSION 2000
#define APE_TAG_FOOTER_BYTES 32
#define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)
#define APE_TAG_FLAG_IS_HEADER (1 << 29)
#define APE_TAG_FLAG_IS_BINARY (1 << 1)
@@ -127,7 +125,7 @@ void ff_ape_parse_tag(AVFormatContext *s)
avio_seek(pb, file_size - APE_TAG_FOOTER_BYTES, SEEK_SET);

avio_read(pb, buf, 8); /* APETAGEX */
if (strncmp(buf, "APETAGEX", 8)) {
if (strncmp(buf, APE_TAG_PREAMBLE, 8)) {
return;
}



+ 4
- 0
libavformat/apetag.h View File

@@ -25,6 +25,10 @@

#include "avformat.h"

#define APE_TAG_PREAMBLE "APETAGEX"
#define APE_TAG_VERSION 2000
#define APE_TAG_FOOTER_BYTES 32

/**
* Read and parse an APE tag
*/


+ 0
- 4
libavformat/apetagenc.c View File

@@ -24,10 +24,6 @@
#include "avformat.h"
#include "apetag.h"

#define APE_TAG_PREAMBLE "APETAGEX"
#define APE_TAG_VERSION 2000
#define APE_TAG_FOOTER_BYTES 32

static int string_is_ascii(const uint8_t *str)
{
while (*str && *str >= 0x20 && *str <= 0x7e ) str++;


Loading…
Cancel
Save