Merge commit '9731cf4001377fa2f75c279072cc2b0cbd57bf8e'

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

Conflicts:
	libavformat/movenc.c

See: 95165f7c1b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-03-06 20:54:41 +01:00
commit 1468ff49df
1 changed files with 6 additions and 6 deletions

View File

@ -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)
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) {