Merge remote-tracking branch 'jamrial/release/1.2' into release/1.2
* jamrial/release/1.2: oggparseskeleton: avoid header parsing failure oggparseskeleton: Replace avpriv_report_missing_feature() with a normal av_log() call oggparseskeleton: Fix fisbone header parsing Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -37,6 +37,9 @@ static int skeleton_header(AVFormatContext *s, int idx)
|
|||||||
strcpy(st->codec->codec_name, "skeleton");
|
strcpy(st->codec->codec_name, "skeleton");
|
||||||
st->codec->codec_type = AVMEDIA_TYPE_DATA;
|
st->codec->codec_type = AVMEDIA_TYPE_DATA;
|
||||||
|
|
||||||
|
if ((os->flags & OGG_FLAG_EOS) && os->psize == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (os->psize < 8)
|
if (os->psize < 8)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -74,12 +77,16 @@ static int skeleton_header(AVFormatContext *s, int idx)
|
|||||||
|
|
||||||
target_idx = ogg_find_stream(ogg, AV_RL32(buf+12));
|
target_idx = ogg_find_stream(ogg, AV_RL32(buf+12));
|
||||||
start_granule = AV_RL64(buf+36);
|
start_granule = AV_RL64(buf+36);
|
||||||
if (os->start_granule != OGG_NOGRANULE_VALUE) {
|
if (target_idx < 0) {
|
||||||
av_log_missing_feature(s,
|
av_log(s, AV_LOG_WARNING, "Serial number in fisbone doesn't match any stream\n");
|
||||||
"Multiple fisbone for the same stream", 0);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (target_idx >= 0 && start_granule != OGG_NOGRANULE_VALUE) {
|
os = ogg->streams + target_idx;
|
||||||
|
if (os->start_granule != OGG_NOGRANULE_VALUE) {
|
||||||
|
av_log(s, AV_LOG_WARNING, "Multiple fisbone for the same stream\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (start_granule != OGG_NOGRANULE_VALUE) {
|
||||||
os->start_granule = start_granule;
|
os->start_granule = start_granule;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user