|
|
@ -173,7 +173,6 @@ static int xbin_read_header(AVFormatContext *s, |
|
|
|
BinDemuxContext *bin = s->priv_data; |
|
|
|
BinDemuxContext *bin = s->priv_data; |
|
|
|
ByteIOContext *pb = s->pb; |
|
|
|
ByteIOContext *pb = s->pb; |
|
|
|
char fontheight, flags; |
|
|
|
char fontheight, flags; |
|
|
|
uint8_t *h; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AVStream *st = init_stream(s, ap); |
|
|
|
AVStream *st = init_stream(s, ap); |
|
|
|
if (!st) |
|
|
|
if (!st) |
|
|
@ -193,7 +192,7 @@ static int xbin_read_header(AVFormatContext *s, |
|
|
|
st->codec->extradata_size += fontheight * (flags & 0x10 ? 512 : 256); |
|
|
|
st->codec->extradata_size += fontheight * (flags & 0x10 ? 512 : 256); |
|
|
|
st->codec->codec_id = flags & 4 ? CODEC_ID_XBIN : CODEC_ID_BINTEXT; |
|
|
|
st->codec->codec_id = flags & 4 ? CODEC_ID_XBIN : CODEC_ID_BINTEXT; |
|
|
|
|
|
|
|
|
|
|
|
h = st->codec->extradata = av_malloc(st->codec->extradata_size); |
|
|
|
st->codec->extradata = av_malloc(st->codec->extradata_size); |
|
|
|
if (!st->codec->extradata) |
|
|
|
if (!st->codec->extradata) |
|
|
|
return AVERROR(ENOMEM); |
|
|
|
return AVERROR(ENOMEM); |
|
|
|
st->codec->extradata[0] = fontheight; |
|
|
|
st->codec->extradata[0] = fontheight; |
|
|
|