Merge commit 'f06f6daaf8538eb8ceeb690b761f1256771b6ba6'
* commit 'f06f6daaf8538eb8ceeb690b761f1256771b6ba6':
mxf: Parse random index pack
Conflicts:
libavformat/mxfdec.c
See: f5ed83c383
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1891,10 +1891,14 @@ static int mxf_parse_handle_essence(MXFContext *mxf)
|
|||||||
|
|
||||||
if (mxf->parsing_backward) {
|
if (mxf->parsing_backward) {
|
||||||
return mxf_seek_to_previous_partition(mxf);
|
return mxf_seek_to_previous_partition(mxf);
|
||||||
} else if (mxf->footer_partition || mxf->last_partition){
|
} else {
|
||||||
uint64_t offset;
|
uint64_t offset = mxf->footer_partition ? mxf->footer_partition
|
||||||
|
: mxf->last_partition;
|
||||||
|
|
||||||
offset = mxf->footer_partition ? mxf->footer_partition : mxf->last_partition;
|
if (!offset) {
|
||||||
|
av_dlog(mxf->fc, "no last partition\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
av_dlog(mxf->fc, "seeking to last partition\n");
|
av_dlog(mxf->fc, "seeking to last partition\n");
|
||||||
|
|
||||||
@@ -1908,16 +1912,15 @@ static int mxf_parse_handle_essence(MXFContext *mxf)
|
|||||||
|
|
||||||
/* seek to last partition and parse backward */
|
/* seek to last partition and parse backward */
|
||||||
if ((ret = avio_seek(pb, mxf->run_in + offset, SEEK_SET)) < 0) {
|
if ((ret = avio_seek(pb, mxf->run_in + offset, SEEK_SET)) < 0) {
|
||||||
av_log(mxf->fc, AV_LOG_ERROR, "failed to seek to last partition @ 0x%"PRIx64" (%"PRId64") - partial file?\n",
|
av_log(mxf->fc, AV_LOG_ERROR,
|
||||||
|
"failed to seek to last partition @ 0x%" PRIx64
|
||||||
|
" (%"PRId64") - partial file?\n",
|
||||||
mxf->run_in + offset, ret);
|
mxf->run_in + offset, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
mxf->current_partition = NULL;
|
mxf->current_partition = NULL;
|
||||||
mxf->parsing_backward = 1;
|
mxf->parsing_backward = 1;
|
||||||
} else {
|
|
||||||
av_dlog(mxf->fc, "can't find last partition\n");
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user