mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/mxfdec: Avoid some redundant writing to tables in mxf_compute_ptses_fake_index()
offsets suggested by Tomas Härdin Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1182bbb2c3
commit
c5bd689655
@ -1940,10 +1940,10 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta
|
||||
if (index_table->nb_ptses <= 0)
|
||||
return 0;
|
||||
|
||||
if (!(index_table->ptses = av_calloc(index_table->nb_ptses, sizeof(int64_t))) ||
|
||||
if (!(index_table->ptses = av_malloc_array(index_table->nb_ptses, sizeof(int64_t))) ||
|
||||
!(index_table->fake_index = av_calloc(index_table->nb_ptses, sizeof(AVIndexEntry))) ||
|
||||
!(index_table->offsets = av_calloc(index_table->nb_ptses, sizeof(int8_t))) ||
|
||||
!(flags = av_calloc(index_table->nb_ptses, sizeof(uint8_t)))) {
|
||||
!(index_table->offsets = av_malloc_array(index_table->nb_ptses, sizeof(int8_t))) ||
|
||||
!(flags = av_malloc_array(index_table->nb_ptses, sizeof(uint8_t)))) {
|
||||
av_freep(&index_table->ptses);
|
||||
av_freep(&index_table->fake_index);
|
||||
av_freep(&index_table->offsets);
|
||||
|
Loading…
Reference in New Issue
Block a user