MT#55283 fix possible mem leak

Warned-by: Coverity
Change-Id: I6a1f398272be2929f1157ed0ecdb667e26d3797a
(cherry picked from commit a968afcd1d)
rfuchs/dataport-mr11.5
Richard Fuchs 1 year ago
parent 27e9e93e57
commit ff8804a55c

@ -674,10 +674,12 @@ static char *start_dump_stream(struct stream *s, const char *suffix) {
s->avst->codecpar->sample_rate = s->out_params.clock_rate;
s->avst->time_base = (AVRational) {1, s->out_params.clock_rate}; // TODO: is this the correct time base?
err = NULL;
int ret = avio_open(&s->fmtctx->pb, fn, AVIO_FLAG_WRITE);
msg = g_strdup_printf("Failed to open output file '%s'", fn);
if (ret < 0)
if (ret < 0) {
msg = g_strdup_printf("Failed to open output file '%s'", fn);
goto out;
}
err = "Failed to write file header";
ret = avformat_write_header(s->fmtctx, NULL);
if (ret < 0)

Loading…
Cancel
Save