* 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>
... | ... |
@@ -37,6 +37,9 @@ static int skeleton_header(AVFormatContext *s, int idx) |
37 | 37 |
strcpy(st->codec->codec_name, "skeleton"); |
38 | 38 |
st->codec->codec_type = AVMEDIA_TYPE_DATA; |
39 | 39 |
|
40 |
+ if ((os->flags & OGG_FLAG_EOS) && os->psize == 0) |
|
41 |
+ return 1; |
|
42 |
+ |
|
40 | 43 |
if (os->psize < 8) |
41 | 44 |
return -1; |
42 | 45 |
|
... | ... |
@@ -74,12 +77,16 @@ static int skeleton_header(AVFormatContext *s, int idx) |
74 | 74 |
|
75 | 75 |
target_idx = ogg_find_stream(ogg, AV_RL32(buf+12)); |
76 | 76 |
start_granule = AV_RL64(buf+36); |
77 |
+ if (target_idx < 0) { |
|
78 |
+ av_log(s, AV_LOG_WARNING, "Serial number in fisbone doesn't match any stream\n"); |
|
79 |
+ return 1; |
|
80 |
+ } |
|
81 |
+ os = ogg->streams + target_idx; |
|
77 | 82 |
if (os->start_granule != OGG_NOGRANULE_VALUE) { |
78 |
- av_log_missing_feature(s, |
|
79 |
- "Multiple fisbone for the same stream", 0); |
|
83 |
+ av_log(s, AV_LOG_WARNING, "Multiple fisbone for the same stream\n"); |
|
80 | 84 |
return 1; |
81 | 85 |
} |
82 |
- if (target_idx >= 0 && start_granule != OGG_NOGRANULE_VALUE) { |
|
86 |
+ if (start_granule != OGG_NOGRANULE_VALUE) { |
|
83 | 87 |
os->start_granule = start_granule; |
84 | 88 |
} |
85 | 89 |
} |