Skip to content

Commit b42159f

Browse files
committed
bluray: fix blanking
1 parent 5683a68 commit b42159f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

modules/access/bluray.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,18 +388,17 @@ static void startBackground(demux_t *p_demux)
388388
fmt.i_group = 1;
389389

390390
p_sys->p_dummy_video = es_out_Add(p_demux->out, &fmt);
391-
es_format_Clean(&fmt);
392391

393392
if (!p_sys->p_dummy_video) {
394-
msg_Err(p_demux, "Error adding background ES");
395-
return;
393+
msg_Err(p_demux, "Error adding background ES");
394+
goto out;
396395
}
397396

398397
block_t *p_block = block_Alloc(fmt.video.i_width * fmt.video.i_height *
399398
fmt.video.i_bits_per_pixel / 8);
400399
if (!p_block) {
401400
msg_Err(p_demux, "Error allocating block for background video");
402-
return;
401+
goto out;
403402
}
404403

405404
// XXX TODO: what would be correct timestamp ???
@@ -411,6 +410,9 @@ static void startBackground(demux_t *p_demux)
411410
memset(p, 0x80, fmt.video.i_width * fmt.video.i_height / 2);
412411

413412
es_out_Send(p_demux->out, p_sys->p_dummy_video, p_block);
413+
414+
out:
415+
es_format_Clean(&fmt);
414416
}
415417

416418
static void stopBackground(demux_t *p_demux)

0 commit comments

Comments
 (0)