Skip to content

Commit 8575fcb

Browse files
committed
audio postprocess: fix inv subtraction
audio decoder stats were not print since the commit 29bdafd Signed-off-by: Martin Pulec <martin.pulec@cesnet.cz>
1 parent 966916e commit 8575fcb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/audio/postprocess.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,15 +450,15 @@ decode_audio_frame_postprocess(struct state_audio_postprocess *postprocess,
450450
}
451451

452452
time_ns_t t = get_time_in_ns();
453-
if ((postprocess->t0 - t) > SEC_TO_NS(5)) {
453+
if ((t - postprocess->t0) > SEC_TO_NS(5)) {
454454
struct adec_stats_processing_data *d = calloc(1, sizeof *d);
455455
d->frame = audio_frame2_alloc(
456456
audio_frame2_get_channel_count(decompressed), AC_PCM,
457457
audio_frame2_get_bps(decompressed),
458458
audio_frame2_get_sample_rate(decompressed));
459459
audio_frame2_reserve(d->frame, 6);
460460
SWAP_PTR(d->frame, postprocess->decoded);
461-
d->seconds = NS_TO_SEC_DBL(postprocess->t0 - t);
461+
d->seconds = NS_TO_SEC_DBL(t - postprocess->t0);
462462
d->bytes_received = *received_bytes_cum;
463463
d->bytes_expected = *expected_bytes_cum;
464464
d->muted_receiver = postprocess->muted;

0 commit comments

Comments
 (0)