Unified · Split
| @@ -87,11 +87,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, · 86 unmodified lines | ||
| 87 | 87 | /* retrieve sps and pps unit(s) */ |
| 88 | 88 | unit_nb = *extradata++ & 0x1f; /* number of sps unit(s) */ |
| 89 | 89 | if (!unit_nb) { |
| 90 | − unit_nb = *extradata++; /* number of pps unit(s) */ | |
| 91 | − sps_done++; | |
| 92 | − | |
| 93 | − if (unit_nb) | |
| 94 | − pps_seen = 1; | |
| 90 | + goto pps; | |
| 95 | 91 | } else { |
| 96 | 92 | sps_seen = 1; |
| 97 | 93 | } |
| @@ -115,7 +111,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, · 17 unmodified lines | ||
| 115 | 111 | memcpy(out+total_size-unit_size-4, nalu_header, 4); |
| 116 | 112 | memcpy(out+total_size-unit_size, extradata+2, unit_size); |
| 117 | 113 | extradata += 2+unit_size; |
| 118 | − | |
| 114 | +pps: | |
| 119 | 115 | if (!unit_nb && !sps_done++) { |
| 120 | 116 | unit_nb = *extradata++; /* number of pps unit(s) */ |
| 121 | 117 | if (unit_nb) |