Ensures no bogus values being preserved after returning.
Unified · Split
| @@ -5430,18 +5430,18 @@ static int heif_add_stream(MOVContext *c, HEIFItem *item) · 5429 unmodified lines | ||
| 5430 | 5430 | sc->stsc_data[0].first = 1; |
| 5431 | 5431 | sc->stsc_data[0].count = 1; |
| 5432 | 5432 | sc->stsc_data[0].id = 1; |
| 5433 | − sc->chunk_count = 1; | |
| 5434 | 5433 | sc->chunk_offsets = av_malloc_array(1, sizeof(*sc->chunk_offsets)); |
| 5435 | 5434 | if (!sc->chunk_offsets) |
| 5436 | 5435 | return AVERROR(ENOMEM); |
| 5437 | − sc->sample_count = 1; | |
| 5436 | + sc->chunk_count = 1; | |
| 5438 | 5437 | sc->sample_sizes = av_malloc_array(1, sizeof(*sc->sample_sizes)); |
| 5439 | 5438 | if (!sc->sample_sizes) |
| 5440 | 5439 | return AVERROR(ENOMEM); |
| 5441 | − sc->stts_count = 1; | |
| 5440 | + sc->sample_count = 1; | |
| 5442 | 5441 | sc->stts_data = av_malloc_array(1, sizeof(*sc->stts_data)); |
| 5443 | 5442 | if (!sc->stts_data) |
| 5444 | 5443 | return AVERROR(ENOMEM); |
| 5444 | + sc->stts_count = 1; | |
| 5445 | 5445 | sc->stts_data[0].count = 1; |
| 5446 | 5446 | // Not used for still images. But needed by mov_build_index. |
| 5447 | 5447 | sc->stts_data[0].duration = 0; |