mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
remove broken ctab code
Originally committed as revision 8771 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
fa22ca2214
commit
d614f57978
@ -83,13 +83,6 @@ typedef struct {
|
|||||||
int64_t size; /* total size (excluding the size and type fields) */
|
int64_t size; /* total size (excluding the size and type fields) */
|
||||||
} MOV_atom_t;
|
} MOV_atom_t;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int seed;
|
|
||||||
int flags;
|
|
||||||
int size;
|
|
||||||
void* clrs;
|
|
||||||
} MOV_ctab_t;
|
|
||||||
|
|
||||||
typedef struct MOV_mdat_atom_s {
|
typedef struct MOV_mdat_atom_s {
|
||||||
offset_t offset;
|
offset_t offset;
|
||||||
int64_t size;
|
int64_t size;
|
||||||
@ -183,8 +176,6 @@ typedef struct MOVContext {
|
|||||||
int total_streams;
|
int total_streams;
|
||||||
MOVStreamContext *streams[MAX_STREAMS];
|
MOVStreamContext *streams[MAX_STREAMS];
|
||||||
|
|
||||||
int ctab_size;
|
|
||||||
MOV_ctab_t **ctab; /* color tables */
|
|
||||||
const struct MOVParseTableEntry *parse_table; /* could be eventually used to change the table */
|
const struct MOVParseTableEntry *parse_table; /* could be eventually used to change the table */
|
||||||
/* NOTE: for recursion save to/ restore from local variable! */
|
/* NOTE: for recursion save to/ restore from local variable! */
|
||||||
|
|
||||||
@ -274,30 +265,6 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mov_read_ctab(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
|
||||||
{
|
|
||||||
#if 1
|
|
||||||
url_fskip(pb, atom.size); // for now
|
|
||||||
#else
|
|
||||||
VERY VERY BROKEN, NEVER execute this, needs rewrite
|
|
||||||
unsigned int len;
|
|
||||||
MOV_ctab_t *t;
|
|
||||||
c->ctab = av_realloc(c->ctab, ++c->ctab_size);
|
|
||||||
t = c->ctab[c->ctab_size];
|
|
||||||
t->seed = get_be32(pb);
|
|
||||||
t->flags = get_be16(pb);
|
|
||||||
t->size = get_be16(pb) + 1;
|
|
||||||
len = 2 * t->size * 4;
|
|
||||||
if (len > 0) {
|
|
||||||
t->clrs = av_malloc(len); // 16bit A R G B
|
|
||||||
if (t->clrs)
|
|
||||||
get_buffer(pb, t->clrs, len);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
||||||
{
|
{
|
||||||
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
|
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
|
||||||
@ -1297,7 +1264,6 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
|
|||||||
{ MKTAG( 't', 'k', 'h', 'd' ), mov_read_tkhd }, /* track header */
|
{ MKTAG( 't', 'k', 'h', 'd' ), mov_read_tkhd }, /* track header */
|
||||||
{ MKTAG( 't', 'r', 'a', 'k' ), mov_read_trak },
|
{ MKTAG( 't', 'r', 'a', 'k' ), mov_read_trak },
|
||||||
{ MKTAG( 'w', 'a', 'v', 'e' ), mov_read_wave },
|
{ MKTAG( 'w', 'a', 'v', 'e' ), mov_read_wave },
|
||||||
{ MKTAG( 'c', 't', 'a', 'b' ), mov_read_ctab },
|
|
||||||
{ MKTAG( 'e', 's', 'd', 's' ), mov_read_esds },
|
{ MKTAG( 'e', 's', 'd', 's' ), mov_read_esds },
|
||||||
{ MKTAG( 'w', 'i', 'd', 'e' ), mov_read_wide }, /* place holder */
|
{ MKTAG( 'w', 'i', 'd', 'e' ), mov_read_wide }, /* place holder */
|
||||||
{ MKTAG( 'c', 'm', 'o', 'v' ), mov_read_cmov },
|
{ MKTAG( 'c', 'm', 'o', 'v' ), mov_read_cmov },
|
||||||
@ -1667,9 +1633,6 @@ static int mov_read_close(AVFormatContext *s)
|
|||||||
MOVContext *mov = s->priv_data;
|
MOVContext *mov = s->priv_data;
|
||||||
for(i=0; i<mov->total_streams; i++)
|
for(i=0; i<mov->total_streams; i++)
|
||||||
mov_free_stream_context(mov->streams[i]);
|
mov_free_stream_context(mov->streams[i]);
|
||||||
/* free color tabs */
|
|
||||||
for(i=0; i<mov->ctab_size; i++)
|
|
||||||
av_freep(&mov->ctab[i]);
|
|
||||||
if(mov->dv_demux){
|
if(mov->dv_demux){
|
||||||
for(i=0; i<mov->dv_fctx->nb_streams; i++){
|
for(i=0; i<mov->dv_fctx->nb_streams; i++){
|
||||||
av_freep(&mov->dv_fctx->streams[i]->codec);
|
av_freep(&mov->dv_fctx->streams[i]->codec);
|
||||||
@ -1678,7 +1641,6 @@ static int mov_read_close(AVFormatContext *s)
|
|||||||
av_freep(&mov->dv_fctx);
|
av_freep(&mov->dv_fctx);
|
||||||
av_freep(&mov->dv_demux);
|
av_freep(&mov->dv_demux);
|
||||||
}
|
}
|
||||||
av_freep(&mov->ctab);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user