When we see prefix NALs before a Subset SPS has been spotted,
it might just be because the stream was truncated at the
start, so don't count those as either 'bad' or 'good' packets.
if (nut == 15) {
seen_ssps = TRUE;
good++;
- } else if (seen_ssps && (nut == 14 || nut == 20)) {
- good++;
+ } else if (nut == 14 || nut == 20) {
+ /* Sometimes we see NAL 14 or 20 without SSPS
+ * if dropped into the middle of a stream -
+ * just ignore those (don't add to bad count) */
+ if (seen_ssps)
+ good++;
} else {
/* reserved */
/* Theoretically these are good, since if they exist in the