Commit eaa21b68 authored by Michael Niedermayer's avatar Michael Niedermayer

H264: hotfix for speedloss on frame threading and h264 files with slices.

This fix is not ideal as it still limits the multithreading on field pictures
to the 2nd field only.
Ill try to fix it properly to allow both fields to decode concurrently but this
needs more work.

This bug exists since and was caused by:
commit ea6331f8
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date:   Mon Jun 20 10:24:33 2011 -0400

    h264-mt: fix deadlock in packets with multiple slices (e.g. MP4).
parent a9255d37
......@@ -3710,8 +3710,12 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
switch (hx->nal_unit_type) {
case NAL_SPS:
case NAL_PPS:
nals_needed = nal_index;
break;
case NAL_IDR_SLICE:
case NAL_SLICE:
init_get_bits(&hx->s.gb, ptr, bit_length);
if(!get_ue_golomb(&hx->s.gb))
nals_needed = nal_index;
}
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment