On Sat, 2015-07-11 at 18:54 +0200, Marton Balint wrote: > This should fix seeking for open GOP files as well. > > Signed-off-by: Marton Balint <c...@passwd.hu> > --- > @@ -1411,8 +1417,7 @@ static int mxf_compute_ptses_fake_index(MXFContext > *mxf, MXFIndexTable *index_ta > break; > } > > - index_table->fake_index[x].timestamp = x;
Why is this removed? > - index_table->fake_index[x].flags = !(s->flag_entries[j] & 0x30) > ? AVINDEX_KEYFRAME : 0; > + flags[x] = !(s->flag_entries[j] & 0x30) ? AVINDEX_KEYFRAME : 0; > > if (index < 0 || index >= index_table->nb_ptses) { > av_log(mxf->fc, AV_LOG_ERROR, > @@ -1421,11 +1426,20 @@ static int mxf_compute_ptses_fake_index(MXFContext > *mxf, MXFIndexTable *index_ta > continue; > } > > + index_table->offsets[x] = offset; > index_table->ptses[index] = x; > max_temporal_offset = FFMAX(max_temporal_offset, offset); > } > } > > + /* calculate the fake index table in display order */ > + for (x = 0; x < index_table->nb_ptses; x++) { > + index_table->fake_index[x].timestamp = x; > + if (index_table->ptses[x] != AV_NOPTS_VALUE) > + index_table->fake_index[index_table->ptses[x]].flags = flags[x]; ptses are checked to be in range, right? Anyway, the patch is probably OK. I recall doing something similar at work in another mxf library. Do we have test files with B-frames? If not then this may be a good time to add them. /Tomas
signature.asc
Description: This is a digitally signed message part
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel