diff options
Diffstat (limited to 'libavformat/oggparseskeleton.c')
-rw-r--r-- | libavformat/oggparseskeleton.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c index 62dd14d..b0f55dd 100644 --- a/libavformat/oggparseskeleton.c +++ b/libavformat/oggparseskeleton.c @@ -1,20 +1,20 @@ /* * Copyright (C) 2010 David Conrad * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -46,7 +46,7 @@ static int skeleton_header(AVFormatContext *s, int idx) version_major = AV_RL16(buf+8); version_minor = AV_RL16(buf+10); - if (version_major != 3) { + if (version_major != 3 && version_major != 4) { av_log(s, AV_LOG_WARNING, "Unknown skeleton version %d.%d\n", version_major, version_minor); return -1; @@ -74,8 +74,11 @@ static int skeleton_header(AVFormatContext *s, int idx) target_idx = ogg_find_stream(ogg, AV_RL32(buf+12)); start_granule = AV_RL64(buf+36); if (target_idx >= 0 && start_granule != -1) { + int64_t pts = ogg_gptopts(s, target_idx, start_granule, NULL); + if (pts == AV_NOPTS_VALUE) + return -1; ogg->streams[target_idx].lastpts = - s->streams[target_idx]->start_time = ogg_gptopts(s, target_idx, start_granule, NULL); + s->streams[target_idx]->start_time = pts; } } |