Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2588178669 | ||
![]() |
12cb64e8d9 | ||
![]() |
ae668a283d | ||
![]() |
2c66058737 | ||
![]() |
813b3d11e0 | ||
![]() |
29ff1a5f1a | ||
![]() |
f504049b22 | ||
![]() |
c446bc31f5 | ||
![]() |
52fa7a8603 | ||
![]() |
d814b9b51d | ||
![]() |
1d285db8a3 | ||
![]() |
cd24fdad47 | ||
![]() |
ee57bfc47a | ||
![]() |
4a442ac117 | ||
![]() |
d8c4ee6fea | ||
![]() |
e32acc455d | ||
![]() |
6f2f754d97 | ||
![]() |
f072b69f39 | ||
![]() |
e489d5c54d | ||
![]() |
5888e656ce | ||
![]() |
9fef5d5553 | ||
![]() |
6e2fb5cd73 | ||
![]() |
aef81fa75d | ||
![]() |
13cf445358 | ||
![]() |
83d5871cf1 | ||
![]() |
bd6e58d5ca | ||
![]() |
fe995dcd84 | ||
![]() |
9b481654e1 |
2
Doxyfile
2
Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 1.0.6
|
||||
PROJECT_NUMBER = 1.0.7
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
|
@@ -190,13 +190,13 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags,
|
||||
void show_help_children(const AVClass *class, int flags);
|
||||
|
||||
/**
|
||||
* Per-avtool specific help handler. Implemented in each
|
||||
* avtool, called by show_help().
|
||||
* Per-fftool specific help handler. Implemented in each
|
||||
* fftool, called by show_help().
|
||||
*/
|
||||
void show_help_default(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Generic -h handler common to all avtools.
|
||||
* Generic -h handler common to all fftools.
|
||||
*/
|
||||
int show_help(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
|
@@ -295,7 +295,9 @@ static int cdg_decode_frame(AVCodecContext *avctx,
|
||||
inst = bytestream_get_byte(&buf);
|
||||
inst &= CDG_MASK;
|
||||
buf += 2; /// skipping 2 unneeded bytes
|
||||
bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
|
||||
|
||||
if (buf_size > CDG_HEADER_SIZE)
|
||||
bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
|
||||
|
||||
if ((command & CDG_MASK) == CDG_COMMAND) {
|
||||
switch (inst) {
|
||||
|
@@ -27,7 +27,7 @@ const int ff_flac_sample_rate_table[16] =
|
||||
8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000,
|
||||
0, 0, 0, 0 };
|
||||
|
||||
const int16_t ff_flac_blocksize_table[16] = {
|
||||
const int32_t ff_flac_blocksize_table[16] = {
|
||||
0, 192, 576<<0, 576<<1, 576<<2, 576<<3, 0, 0,
|
||||
256<<0, 256<<1, 256<<2, 256<<3, 256<<4, 256<<5, 256<<6, 256<<7
|
||||
};
|
||||
|
@@ -26,6 +26,6 @@
|
||||
|
||||
extern const int ff_flac_sample_rate_table[16];
|
||||
|
||||
extern const int16_t ff_flac_blocksize_table[16];
|
||||
extern const int32_t ff_flac_blocksize_table[16];
|
||||
|
||||
#endif /* AVCODEC_FLACDATA_H */
|
||||
|
@@ -367,7 +367,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
if(sps->profile_idc == 100 || sps->profile_idc == 110 ||
|
||||
sps->profile_idc == 122 || sps->profile_idc == 244 || sps->profile_idc == 44 ||
|
||||
sps->profile_idc == 83 || sps->profile_idc == 86 || sps->profile_idc == 118 ||
|
||||
sps->profile_idc == 128 ) {
|
||||
sps->profile_idc == 128 || sps->profile_idc == 144) {
|
||||
sps->chroma_format_idc= get_ue_golomb_31(&s->gb);
|
||||
if (sps->chroma_format_idc > 3U) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "chroma_format_idc %d is illegal\n", sps->chroma_format_idc);
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "libavutil/pixdesc.h"
|
||||
#include "avcodec.h"
|
||||
#include "bytestream.h"
|
||||
#include "lcl.h"
|
||||
@@ -484,6 +485,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
unsigned int basesize = avctx->width * avctx->height;
|
||||
unsigned int max_basesize = FFALIGN(avctx->width, 4) * FFALIGN(avctx->height, 4) + AV_LZO_OUTPUT_PADDING;
|
||||
unsigned int max_decomp_size;
|
||||
int subsample_h, subsample_v;
|
||||
|
||||
avcodec_get_frame_defaults(&c->pic);
|
||||
if (avctx->extradata_size < 8) {
|
||||
@@ -510,6 +512,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
max_decomp_size = max_basesize * 2;
|
||||
avctx->pix_fmt = PIX_FMT_YUV422P;
|
||||
av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:2.\n");
|
||||
if (avctx->width % 4) {
|
||||
av_log_ask_for_sample(avctx, "Unsupported dimensions\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
break;
|
||||
case IMGTYPE_RGB24:
|
||||
c->decomp_size = basesize * 3;
|
||||
@@ -540,6 +546,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &subsample_h, &subsample_v);
|
||||
if (avctx->width % (1<<subsample_h) || avctx->height % (1<<subsample_v)) {
|
||||
av_log_ask_for_sample(avctx, "Unsupported dimensions\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* Detect compression method */
|
||||
c->compression = (int8_t)avctx->extradata[5];
|
||||
switch (avctx->codec_id) {
|
||||
|
@@ -1602,6 +1602,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
MJpegDecodeContext *s = avctx->priv_data;
|
||||
const uint8_t *buf_end, *buf_ptr;
|
||||
const uint8_t *unescaped_buf_ptr;
|
||||
int hshift, vshift;
|
||||
int unescaped_buf_size;
|
||||
int start_code;
|
||||
int i, index;
|
||||
@@ -1779,6 +1780,9 @@ the_end:
|
||||
}
|
||||
if (s->upscale_v) {
|
||||
uint8_t *dst = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[(s->height - 1) * s->linesize[s->upscale_v]];
|
||||
int w;
|
||||
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift);
|
||||
w = s->width >> hshift;
|
||||
av_assert0(avctx->pix_fmt == PIX_FMT_YUVJ444P ||
|
||||
avctx->pix_fmt == PIX_FMT_YUV444P ||
|
||||
avctx->pix_fmt == PIX_FMT_YUVJ422P ||
|
||||
@@ -1787,16 +1791,16 @@ the_end:
|
||||
uint8_t *src1 = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[i / 2 * s->linesize[s->upscale_v]];
|
||||
uint8_t *src2 = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[(i + 1) / 2 * s->linesize[s->upscale_v]];
|
||||
if (src1 == src2) {
|
||||
memcpy(dst, src1, s->width);
|
||||
memcpy(dst, src1, w);
|
||||
} else {
|
||||
for (index = 0; index < s->width; index++)
|
||||
for (index = 0; index < w; index++)
|
||||
dst[index] = (src1[index] + src2[index]) >> 1;
|
||||
}
|
||||
dst -= s->linesize[s->upscale_v];
|
||||
}
|
||||
}
|
||||
if (s->flipped && (s->avctx->flags & CODEC_FLAG_EMU_EDGE)) {
|
||||
int hshift, vshift, j;
|
||||
int j;
|
||||
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift);
|
||||
for (index=0; index<4; index++) {
|
||||
uint8_t *dst = s->picture_ptr->data[index];
|
||||
|
@@ -104,6 +104,9 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
|
||||
if (half_horiz)
|
||||
run_length *=2;
|
||||
|
||||
if (run_length > s->avctx->width - x)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (color) {
|
||||
memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
|
||||
if (half_vert)
|
||||
@@ -151,6 +154,8 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert)
|
||||
int replace_array = bytestream2_get_byte(&s->gb);
|
||||
for(j=0; j<8; j++) {
|
||||
int replace = (replace_array >> (7-j)) & 1;
|
||||
if (x + half_horiz >= s->avctx->width)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (replace) {
|
||||
int color = bytestream2_get_byte(&data_ptr);
|
||||
s->frame.data[0][y*s->frame.linesize[0] + x] = color;
|
||||
|
@@ -2085,7 +2085,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
|
||||
ptr_cb = ref_picture[1] + uvsrc_y * uvlinesize + uvsrc_x;
|
||||
ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
|
||||
|
||||
if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) ||
|
||||
if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) || uvsrc_y<0 ||
|
||||
(unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - h, 0)) {
|
||||
s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y,
|
||||
s->linesize, 17, 17 + field_based,
|
||||
@@ -2125,11 +2125,12 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
|
||||
pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy);
|
||||
|
||||
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
|
||||
int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
|
||||
uvsx = (uvsx << 2) >> lowres;
|
||||
uvsy = (uvsy << 2) >> lowres;
|
||||
if (h >> s->chroma_y_shift) {
|
||||
pix_op[op_index](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
|
||||
pix_op[op_index](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
|
||||
if (hc) {
|
||||
pix_op[op_index](dest_cb, ptr_cb, uvlinesize, hc, uvsx, uvsy);
|
||||
pix_op[op_index](dest_cr, ptr_cr, uvlinesize, hc, uvsx, uvsy);
|
||||
}
|
||||
}
|
||||
// FIXME h261 lowres loop filter
|
||||
|
@@ -725,6 +725,11 @@ static int process_frame_obj(SANMVideoContext *ctx)
|
||||
w = bytestream2_get_le16u(&ctx->gb);
|
||||
h = bytestream2_get_le16u(&ctx->gb);
|
||||
|
||||
if (!w || !h) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "dimensions are invalid\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (ctx->width < left + w || ctx->height < top + h) {
|
||||
if (av_image_check_size(FFMAX(left + w, ctx->width),
|
||||
FFMAX(top + h, ctx->height), 0, ctx->avctx) < 0)
|
||||
|
@@ -160,7 +160,7 @@ static int rle_unpack(const unsigned char *src, int src_len, int src_count,
|
||||
const unsigned char *ps;
|
||||
const unsigned char *ps_end;
|
||||
unsigned char *pd;
|
||||
int i, l;
|
||||
int i, j, l;
|
||||
unsigned char *dest_end = dest + dest_len;
|
||||
|
||||
ps = src;
|
||||
@@ -186,9 +186,9 @@ static int rle_unpack(const unsigned char *src, int src_len, int src_count,
|
||||
ps += l;
|
||||
pd += l;
|
||||
} else {
|
||||
if (dest_end - pd < i || ps_end - ps < 2)
|
||||
if (dest_end - pd < 2*l || ps_end - ps < 2)
|
||||
return ps - src;
|
||||
for (i = 0; i < l; i++) {
|
||||
for (j = 0; j < l; j++) {
|
||||
*pd++ = ps[0];
|
||||
*pd++ = ps[1];
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int number, len;
|
||||
|
||||
ptr += strcspn(ptr, "#");
|
||||
if (sscanf(ptr, "#define %256s %u", name, &number) != 2) {
|
||||
if (sscanf(ptr, "#define %255s %u", name, &number) != 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unexpected preprocessor directive\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@@ -91,13 +91,13 @@ static int movie_request_frame(AVFilterLink *outlink);
|
||||
static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec)
|
||||
{
|
||||
int i, ret, already = 0, stream_id = -1;
|
||||
char type_char, dummy;
|
||||
char type_char[2], dummy;
|
||||
AVStream *found = NULL;
|
||||
enum AVMediaType type;
|
||||
|
||||
ret = sscanf(spec, "d%[av]%d%c", &type_char, &stream_id, &dummy);
|
||||
ret = sscanf(spec, "d%1[av]%d%c", type_char, &stream_id, &dummy);
|
||||
if (ret >= 1 && ret <= 2) {
|
||||
type = type_char == 'v' ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO;
|
||||
type = type_char[0] == 'v' ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO;
|
||||
ret = av_find_best_stream(avf, type, stream_id, -1, NULL, 0);
|
||||
if (ret < 0) {
|
||||
av_log(log, AV_LOG_ERROR, "No %s stream with index '%d' found\n",
|
||||
|
@@ -176,6 +176,7 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
|
||||
idet->prev = idet->cur;
|
||||
idet->cur = idet->next;
|
||||
idet->next = picref;
|
||||
link->cur_buf = NULL;
|
||||
|
||||
if (!idet->cur)
|
||||
return 0;
|
||||
|
@@ -191,7 +191,7 @@ static int aiff_probe(AVProbeData *p)
|
||||
static int aiff_read_header(AVFormatContext *s)
|
||||
{
|
||||
int size, filesize;
|
||||
int64_t offset = 0;
|
||||
int64_t offset = 0, position;
|
||||
uint32_t tag;
|
||||
unsigned version = AIFF_C_VERSION1;
|
||||
AVIOContext *pb = s->pb;
|
||||
@@ -235,8 +235,11 @@ static int aiff_read_header(AVFormatContext *s)
|
||||
goto got_sound;
|
||||
break;
|
||||
case MKTAG('I', 'D', '3', ' '):
|
||||
position = avio_tell(pb);
|
||||
ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta);
|
||||
ff_id3v2_free_extra_meta(&id3v2_extra_meta);
|
||||
if (position + size > avio_tell(pb))
|
||||
avio_skip(pb, position + size - avio_tell(pb));
|
||||
break;
|
||||
case MKTAG('F', 'V', 'E', 'R'): /* Version chunk */
|
||||
version = avio_rb32(pb);
|
||||
|
@@ -695,7 +695,9 @@ static int avi_read_header(AVFormatContext *s)
|
||||
}
|
||||
break;
|
||||
case MKTAG('s', 't', 'r', 'd'):
|
||||
if (stream_index >= (unsigned)s->nb_streams || s->streams[stream_index]->codec->extradata_size) {
|
||||
if (stream_index >= (unsigned)s->nb_streams
|
||||
|| s->streams[stream_index]->codec->extradata_size
|
||||
|| s->streams[stream_index]->codec->codec_tag == MKTAG('H','2','6','4')) {
|
||||
avio_skip(pb, size);
|
||||
} else {
|
||||
uint64_t cur_pos = avio_tell(pb);
|
||||
|
@@ -492,10 +492,13 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
return ret;
|
||||
} else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
if (!s->streams[pkt->stream_index]->nb_frames) {
|
||||
av_log(s, AV_LOG_ERROR, "Malformed AAC bitstream detected: "
|
||||
"use audio bistream filter 'aac_adtstoasc' to fix it "
|
||||
"('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
}
|
||||
|
||||
if (flv->delay == AV_NOPTS_VALUE)
|
||||
|
@@ -1885,10 +1885,10 @@ static void matroska_clear_queue(MatroskaDemuxContext *matroska)
|
||||
}
|
||||
|
||||
static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf,
|
||||
int size, int type,
|
||||
int* buf_size, int type,
|
||||
uint32_t **lace_buf, int *laces)
|
||||
{
|
||||
int res = 0, n;
|
||||
int res = 0, n, size = *buf_size;
|
||||
uint8_t *data = *buf;
|
||||
uint32_t *lace_size;
|
||||
|
||||
@@ -1986,6 +1986,7 @@ static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf,
|
||||
|
||||
*buf = data;
|
||||
*lace_buf = lace_size;
|
||||
*buf_size = size;
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -2205,7 +2206,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
|
||||
matroska->skip_to_keyframe = 0;
|
||||
}
|
||||
|
||||
res = matroska_parse_laces(matroska, &data, size, (flags & 0x06) >> 1,
|
||||
res = matroska_parse_laces(matroska, &data, &size, (flags & 0x06) >> 1,
|
||||
&lace_size, &laces);
|
||||
|
||||
if (res)
|
||||
@@ -2307,7 +2308,6 @@ static int matroska_parse_cluster_incremental(MatroskaDemuxContext *matroska)
|
||||
}
|
||||
}
|
||||
|
||||
if (res < 0) matroska->done = 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@@ -3085,6 +3085,14 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
memcpy(trk->vos_data, enc->extradata, trk->vos_len);
|
||||
}
|
||||
|
||||
if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
if (!s->streams[pkt->stream_index]->nb_frames) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
}
|
||||
if (enc->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
|
||||
/* from x264 or from bytestream h264 */
|
||||
/* nal reformating needed */
|
||||
@@ -3095,10 +3103,6 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else {
|
||||
size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size);
|
||||
}
|
||||
} else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
} else {
|
||||
avio_write(pb, pkt->data, size);
|
||||
}
|
||||
|
@@ -269,7 +269,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else if(t & 0x40){ /* copy with offset */
|
||||
off = avio_r8(s->pb);
|
||||
j = (t & 0x3F) + 1;
|
||||
if (off + j > 0xff) {
|
||||
if (off + j - 1 > 0xff) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
|
||||
off, j);
|
||||
|
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "common.h"
|
||||
#include "mathematics.h"
|
||||
#include "intfloat_readwrite.h"
|
||||
|
||||
@@ -88,7 +89,7 @@ AVExtFloat av_dbl2ext(double d){
|
||||
ext.mantissa[i] = m>>(56-(i<<3));
|
||||
} else if (f != 0.0) {
|
||||
ext.exponent[0] = 0x7f; ext.exponent[1] = 0xff;
|
||||
if (f != INFINITY)
|
||||
if (!isinf(f))
|
||||
ext.mantissa[0] = ~0;
|
||||
}
|
||||
if (d < 0)
|
||||
|
@@ -177,7 +177,7 @@ static void format_line(void *ptr, int level, const char *fmt, va_list vl,
|
||||
if (parent && *parent) {
|
||||
snprintf(part[0], part_size, "[%s @ %p] ",
|
||||
(*parent)->item_name(parent), parent);
|
||||
if(type) type[0] = get_category(((uint8_t *) ptr) + avc->parent_log_context_offset);
|
||||
if(type) type[0] = get_category(parent);
|
||||
}
|
||||
}
|
||||
snprintf(part[1], part_size, "[%s @ %p] ",
|
||||
|
@@ -205,13 +205,13 @@ int main (void)
|
||||
av_lfg_init(&prng, 1);
|
||||
|
||||
for (i = 0; i < 10000; i++) {
|
||||
int j = av_lfg_get(&prng) % 86294;
|
||||
intptr_t j = av_lfg_get(&prng) % 86294;
|
||||
if (check(root) > 999) {
|
||||
av_log(NULL, AV_LOG_ERROR, "FATAL error %d\n", i);
|
||||
print(root, 0);
|
||||
return -1;
|
||||
}
|
||||
av_log(NULL, AV_LOG_ERROR, "inserting %4d\n", j);
|
||||
av_log(NULL, AV_LOG_ERROR, "inserting %4d\n", (int)j);
|
||||
if (!node)
|
||||
node = av_mallocz(av_tree_node_size);
|
||||
av_tree_insert(&root, (void *) (j + 1), cmp, &node);
|
||||
@@ -219,7 +219,7 @@ int main (void)
|
||||
j = av_lfg_get(&prng) % 86294;
|
||||
{
|
||||
AVTreeNode *node2 = NULL;
|
||||
av_log(NULL, AV_LOG_ERROR, "removing %4d\n", j);
|
||||
av_log(NULL, AV_LOG_ERROR, "removing %4d\n", (int)j);
|
||||
av_tree_insert(&root, (void *) (j + 1), cmp, &node2);
|
||||
k = av_tree_find(root, (void *) (j + 1), cmp, NULL);
|
||||
if (k)
|
||||
|
Reference in New Issue
Block a user