h264bitstream
h264bitstream copied to clipboard
sps_table support is broken, complete failure when seq_parameter_set_id != 0
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 I see what you mean! I think the code in PR #17 fixes that, could you give it a try?
@ydirson Latest code in master should behave ok now. Could you test it, or give an example file to test with?