// Increment skip_samples for the first non-zero audio edit list
if (first_non_zero_audio_edit > 0 && st->codecpar->codec_id != AV_CODEC_ID_VORBIS) {
st->skip_samples += frame_duration;
- msc->start_pad = st->skip_samples;
}
}
}
// Update av stream length
st->duration = edit_list_dts_entry_end - start_dts;
+ msc->start_pad = st->skip_samples;
// Free the old index and the old CTTS structures
av_free(e_old);
{
AVStream *st;
MOVStreamContext *sc;
- int size, layout;
+ int size, version, layout;
int32_t yaw, pitch, roll;
uint32_t l = 0, t = 0, r = 0, b = 0;
uint32_t tag, padding = 0;
av_log(c->fc, AV_LOG_ERROR, "Missing spherical video header\n");
return 0;
}
- avio_skip(pb, 4); /* version + flags */
+ version = avio_r8(pb);
+ if (version != 0) {
+ av_log(c->fc, AV_LOG_WARNING, "Unknown spherical version %d\n",
+ version);
+ return 0;
+ }
+ avio_skip(pb, 3); /* flags */
avio_skip(pb, size - 12); /* metadata_source */
size = avio_rb32(pb);
av_log(c->fc, AV_LOG_ERROR, "Missing projection header box\n");
return 0;
}
- avio_skip(pb, 4); /* version + flags */
+ version = avio_r8(pb);
+ if (version != 0) {
+ av_log(c->fc, AV_LOG_WARNING, "Unknown spherical version %d\n",
+ version);
+ return 0;
+ }
+ avio_skip(pb, 3); /* flags */
/* 16.16 fixed point */
yaw = avio_rb32(pb);
return AVERROR_INVALIDDATA;
tag = avio_rl32(pb);
- avio_skip(pb, 4); /* version + flags */
+ version = avio_r8(pb);
+ if (version != 0) {
+ av_log(c->fc, AV_LOG_WARNING, "Unknown spherical version %d\n",
+ version);
+ return 0;
+ }
+ avio_skip(pb, 3); /* flags */
switch (tag) {
case MKTAG('c','b','m','p'):
layout = avio_rb32(pb);
goto out;
/* Check for mandatory keys and values, try to support XML as best-effort */
- if (av_stristr(buffer, "<GSpherical:StitchingSoftware>") &&
+ if (!sc->spherical &&
+ av_stristr(buffer, "<GSpherical:StitchingSoftware>") &&
(val = av_stristr(buffer, "<GSpherical:Spherical>")) &&
av_stristr(val, "true") &&
(val = av_stristr(buffer, "<GSpherical:Stitched>")) &&
sc->spherical->projection = AV_SPHERICAL_EQUIRECTANGULAR;
- if (av_stristr(buffer, "<GSpherical:StereoMode>")) {
+ if (av_stristr(buffer, "<GSpherical:StereoMode>") && !sc->stereo3d) {
enum AVStereo3DType mode;
if (av_stristr(buffer, "left-right"))