diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-03-03 02:13:07 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-03-03 02:13:07 +0300 |
commit | 9fdfd21c771c55d80122b205975f17bcf69ac624 (patch) | |
tree | fb86965bc1cb66c554dc23e6d07585574bcbcbe7 /libavformat/nutdec.c | |
parent | a048febdc4fb0e48f8c47857a1ea1694ede05b9d (diff) |
factorize
Originally committed as revision 12293 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r-- | libavformat/nutdec.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index e584ac521d..402f1f5d4a 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -315,20 +315,14 @@ static int decode_stream_header(NUTContext *nut){ case 0: st->codec->codec_type = CODEC_TYPE_VIDEO; st->codec->codec_id = codec_get_id(codec_bmp_tags, tmp); - if (st->codec->codec_id == CODEC_ID_NONE) - av_log(s, AV_LOG_ERROR, "Unknown codec?!\n"); break; case 1: st->codec->codec_type = CODEC_TYPE_AUDIO; st->codec->codec_id = codec_get_id(codec_wav_tags, tmp); - if (st->codec->codec_id == CODEC_ID_NONE) - av_log(s, AV_LOG_ERROR, "Unknown codec?!\n"); break; case 2: st->codec->codec_type = CODEC_TYPE_SUBTITLE; // st->codec->codec_id = codec_get_id(codec_wav_tags, tmp); FIXME - if (st->codec->codec_id == CODEC_ID_NONE) - av_log(s, AV_LOG_ERROR, "Unknown codec?!\n"); break; case 3: st->codec->codec_type = CODEC_TYPE_DATA; @@ -337,6 +331,9 @@ static int decode_stream_header(NUTContext *nut){ av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class); return -1; } + if(class<3 && st->codec->codec_id == CODEC_ID_NONE) + av_log(s, AV_LOG_ERROR, "Unknown codec?!\n"); + GET_V(stc->time_base_id , tmp < nut->time_base_count); GET_V(stc->msb_pts_shift , tmp < 16); stc->max_pts_distance= ff_get_v(bc); |