In order not to break a sequence like "SPS IDR SPS IDR", the boolean telling that the SPS/PPS has been seen should always be set.
Unified · Split
| @@ -176,7 +176,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, · 175 unmodified lines | ||
| 176 | 176 | if (buf + nal_size > buf_end || nal_size < 0) |
| 177 | 177 | goto fail; |
| 178 | 178 | |
| 179 | − if (ctx->first_idr && (unit_type == 7 || unit_type == 8)) | |
| 179 | + if (unit_type == 7 || unit_type == 8) | |
| 180 | 180 | ctx->idr_sps_pps_seen = 1; |
| 181 | 181 | |
| 182 | 182 | /* if this is a new IDR picture following an IDR picture, reset the idr flag. |