Mercurial > libavformat.hg
diff mpegtsenc.c @ 313:622892a75ddb libavformat
support more codecs in MPEG-TS patch by (mru at kth dot se (Mns Rullgrd))
author | michael |
---|---|
date | Wed, 12 Nov 2003 21:56:57 +0000 |
parents | 2d4dcb1d3e21 |
children | 60f897e8dd2d |
line wrap: on
line diff
--- a/mpegtsenc.c Mon Nov 10 18:49:58 2003 +0000 +++ b/mpegtsenc.c Wed Nov 12 21:56:57 2003 +0000 @@ -258,13 +258,27 @@ for(i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; MpegTSWriteStream *ts_st = st->priv_data; - switch(st->codec.codec_type) { - case CODEC_TYPE_VIDEO: - stream_type = STREAM_TYPE_VIDEO_MPEG2; //XXX/FIXME is this (and the define) correct? + switch(st->codec.codec_id) { + case CODEC_ID_MPEG1VIDEO: + case CODEC_ID_MPEG2VIDEO: + stream_type = STREAM_TYPE_VIDEO_MPEG2; + break; + case CODEC_ID_MPEG4: + stream_type = STREAM_TYPE_VIDEO_MPEG4; break; - case CODEC_TYPE_AUDIO: + case CODEC_ID_H264: + stream_type = STREAM_TYPE_VIDEO_H264; + break; + case CODEC_ID_MP2: + case CODEC_ID_MP3: stream_type = STREAM_TYPE_AUDIO_MPEG1; break; + case CODEC_ID_AAC: + stream_type = STREAM_TYPE_AUDIO_AAC; + break; + case CODEC_ID_AC3: + stream_type = STREAM_TYPE_AUDIO_AC3; + break; default: stream_type = STREAM_TYPE_PRIVATE_DATA; break;