Browse Source

test: input: decoder: handle VLCDEC_RELOAD

When VLCDEC_RELOAD is returned by the decoder_t::pf_decode method, the
vlc_frame_t block will be reused for the next decoder, and cannot be
released.
pull/141/head
Alexandre Janniaux 4 years ago
committed by Steve Lhomme
parent
commit
1dbe1fe20e
  1. 6
      test/src/input/decoder/input_decoder.c

6
test/src/input/decoder/input_decoder.c

@ -84,11 +84,13 @@ static int DecoderDecode(decoder_t *dec, block_t *block)
assert(pic);
pic->date = block->i_pts;
pic->b_progressive = true;
block_Release(block);
struct input_decoder_scenario *scenario = &input_decoder_scenarios[current_scenario];
assert(scenario->decoder_decode != NULL);
return scenario->decoder_decode(dec, pic);
int ret = scenario->decoder_decode(dec, pic);
if (ret != VLCDEC_RELOAD)
block_Release(block);
return ret;
}
static void DecoderFlush(decoder_t *dec)

Loading…
Cancel
Save