h264bitstream icon indicating copy to clipboard operation
h264bitstream copied to clipboard

sps_table support is broken, complete failure when seq_parameter_set_id != 0

Open ydirson opened this issue 8 years ago • 2 comments

The memcpy at the end of read_seq_parameter_set_rbsp() overwrites the struct it just filled with a copy of what's in sps_table. Since h->sps == h->sps_table[0] it just filled that one, the memcpy in the id=0 case is (un?)luckily a no-op, while in all other cases the values just read are just all cleared to 0.

Swapping src/dst can't work properly as is either, since h->sps == h->sps_table[0]: when we notice that seq_parameter_set_id != 0 we have already overwritten h->sps_table[0].

if(0)-ing this memcpy as a workaround works much better...

ydirson avatar Jun 27 '16 11:06 ydirson

@ydirson I see what you mean! I think the code in PR #17 fixes that, could you give it a try?

aizvorski avatar Apr 20 '17 08:04 aizvorski

@ydirson Latest code in master should behave ok now. Could you test it, or give an example file to test with?

aizvorski avatar May 26 '17 07:05 aizvorski