Mercurial > libavformat.hg
changeset 3102:fca018d1bbce libavformat
factorize
author | michael |
---|---|
date | Sun, 02 Mar 2008 23:13:07 +0000 |
parents | 83537aac00f1 |
children | 137e1fc7d16b |
files | nutdec.c |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/nutdec.c Sun Mar 02 23:11:36 2008 +0000 +++ b/nutdec.c Sun Mar 02 23:13:07 2008 +0000 @@ -315,20 +315,14 @@ 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 @@ 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);