History

avformat/mov: set primary extradata based on the first Sample only if it's not already in place

If the first Sample references the first stsd entry, then setting it here is redundant.

James Almer committed 1 year ago

Commit 2681eed1 parent 399c7661 file · +2 −2Browse files

Unified · Split

libavformat/mov.c+2−2
@@ -10684,9 +10684,9 @@ static int mov_read_header(AVFormatContext *s) · 10683 unmodified lines
1068410684 uint32_t dvdsub_clut[FF_DVDCLUT_CLUT_LEN] = {0};
1068510685 fix_timescale(mov, sc);
1068610686
10687− /* Set the primary extradata based on the first Sample. */
10687+ /* Set the primary extradata based on the first Sample if it doesn't reference the first stsd entry. */
1068810688 if (sc->stsc_count && sc->extradata_size && !sc->iamf &&
10689− sc->stsc_data[0].id > 0 && sc->stsc_data[0].id <= sc->stsd_count) {
10689+ sc->stsc_data[0].id > 1 && sc->stsc_data[0].id <= sc->stsd_count) {
1069010690 sc->last_stsd_index = sc->stsc_data[0].id - 1;
1069110691 av_freep(&st->codecpar->extradata);
1069210692 st->codecpar->extradata_size = sc->extradata_size[sc->last_stsd_index];

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t