Skip to content

Commit

Permalink
MT#56374 add proper TODO comments
Browse files Browse the repository at this point in the history
Change-Id: I46c66c4586276b253fcbc96348ef56d52023e6ee
  • Loading branch information
rfuchs committed Sep 14, 2023
1 parent 13367cb commit c94bb41
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions perf-tester/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static GHashTable *worker_threads;
static mutex_t curses_lock = MUTEX_STATIC_INIT;
static WINDOW *popup;

static long long ptime = 20000; // us XXX
static long long ptime = 20000; // us TODO: support different ptimes



Expand Down Expand Up @@ -441,11 +441,11 @@ static void new_stream_params(
int res = encoder_config_fmtp(s->encoder, out_def, bitrate, 20, &dec_format, &enc_format,
&actual_enc_format,
NULL, NULL, NULL);
assert(res == 0); // XXX
assert(res == 0); // TODO: handle failures gracefully

s->decoder = decoder_new_fmtp(in_def, dec_format.clockrate, dec_format.channels, 20,
&actual_enc_format, NULL, NULL, NULL); // XXX
assert(s->decoder != NULL); // XXX
&actual_enc_format, NULL, NULL, NULL); // TODO: support different options (fmtp etc)
assert(s->decoder != NULL); // TODO: handle failures gracefully

// arm timer
struct itimerspec timer = {
Expand Down Expand Up @@ -661,7 +661,7 @@ static char *start_dump_stream(struct stream *s, const char *suffix) {
s->avst->codecpar->codec_id = s->out_params.codec_id;
DEF_CH_LAYOUT(&s->avst->codecpar->CH_LAYOUT, s->out_params.channels);
s->avst->codecpar->sample_rate = s->out_params.clock_rate;
s->avst->time_base = (AVRational) {1, s->out_params.clock_rate}; // XXX ???
s->avst->time_base = (AVRational) {1, s->out_params.clock_rate}; // TODO: is this the correct time base?

int ret = avio_open(&s->fmtctx->pb, fn, AVIO_FLAG_WRITE);
msg = g_strdup_printf("Failed to open output file '%s'", fn);
Expand Down Expand Up @@ -1448,17 +1448,17 @@ static void fixture_read_raw(GPtrArray *fixture, struct testparams *prm) {
AVPacket *pkt = av_packet_alloc();
if (!pkt)
die("Failed to allocate AVPacket");
void *buf = av_malloc(160); // XXX
void *buf = av_malloc(160); // TODO: adapt for different ptimes/sample rates
if (!buf)
die("Out of memory");
size_t ret = fread(buf, 160, 1, fp); // XXX
size_t ret = fread(buf, 160, 1, fp); // TODO: adapt for different ptimes/sample rates
if (ret != 1) {
if (feof(fp))
break;
die("Read error while reading input fixture");
}
pkt->duration = 160; // XXX
av_packet_from_data(pkt, buf, 160); // XXX
pkt->duration = 160; // TODO: adapt for different ptimes/sample rates
av_packet_from_data(pkt, buf, 160); // TODO: adapt for different ptimes/sample rates
g_ptr_array_add(fixture, pkt);
}

Expand Down

0 comments on commit c94bb41

Please sign in to comment.