Commit 1468ff49 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '9731cf40'

* commit '9731cf40':
  movenc: Keep writing zero-entry stts atoms as intended

Conflicts:
	libavformat/movenc.c

See: 95165f7cMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 70082a1e 9731cf40
......@@ -1895,7 +1895,7 @@ static int mov_write_ctts_tag(AVIOContext *pb, MOVTrack *track)
/* Time to sample atom */
static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track)
{
MOVStts *stts_entries;
MOVStts *stts_entries = NULL;
uint32_t entries = -1;
uint32_t atom_size;
int i;
......@@ -1908,11 +1908,11 @@ static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track)
stts_entries[0].duration = 1;
entries = 1;
} else {
stts_entries = track->entry ?
av_malloc_array(track->entry, sizeof(*stts_entries)) : /* worst case */
NULL;
if (track->entry && !stts_entries)
return AVERROR(ENOMEM);
if (track->entry) {
stts_entries = av_malloc_array(track->entry, sizeof(*stts_entries)); /* worst case */
if (!stts_entries)
return AVERROR(ENOMEM);
}
for (i = 0; i < track->entry; i++) {
int duration = get_cluster_duration(track, i);
if (i && duration == stts_entries[entries].duration) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment