| 1243 | } |
| 1244 | |
| 1245 | static int isRecoveryPoint( const uint8_t *buf, int len ) |
| 1246 | { |
| 1247 | uint8_t *nal; |
| 1248 | int nal_len; |
| 1249 | int ii, type, size; |
| 1250 | int recovery_frames = 0; |
| 1251 | |
| 1252 | CreateDecodedNAL( &nal, &nal_len, buf, len ); |
| 1253 | |
| 1254 | for ( ii = 0; ii+1 < nal_len; ) |
| 1255 | { |
| 1256 | type = 0; |
| 1257 | while ( ii+1 < nal_len ) |
| 1258 | { |
| 1259 | type += nal[ii++]; |
| 1260 | if ( nal[ii-1] != 0xff ) |
| 1261 | break; |
| 1262 | } |
| 1263 | size = 0; |
| 1264 | while ( ii+1 < nal_len ) |
| 1265 | { |
| 1266 | size += nal[ii++]; |
| 1267 | if ( nal[ii-1] != 0xff ) |
| 1268 | break; |
| 1269 | } |
| 1270 | |
| 1271 | if( type == 6 ) |
| 1272 | { |
| 1273 | recovery_frames = 1; |
| 1274 | break; |
| 1275 | } |
| 1276 | ii += size; |
| 1277 | } |
| 1278 | |
| 1279 | free( nal ); |
| 1280 | return recovery_frames; |
| 1281 | } |
| 1282 | |
| 1283 | static int isIframe( hb_stream_t *stream, const uint8_t *buf, int len ) |
| 1284 | { |
no test coverage detected