diff options
author | Måns Rullgård <mans@mansr.com> | 2003-11-12 21:56:57 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-11-12 21:56:57 +0000 |
commit | 278de4755d2f30a17d7f8affabadf702050088d0 (patch) | |
tree | f75a73d527a28bba171c13a5bf91203e9d6f39ce /libavformat/mpegtsenc.c | |
parent | 30758048ef85927a54fcf45dfb4c67119b9e88e7 (diff) | |
download | ffmpeg-278de4755d2f30a17d7f8affabadf702050088d0.tar.gz |
support more codecs in MPEG-TS patch by (mru at kth dot se (Måns Rullgård))
Originally committed as revision 2511 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index e4d7f3d7b8..7a20f8525a 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -258,13 +258,27 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) 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_TYPE_AUDIO: + case CODEC_ID_MPEG4: + stream_type = STREAM_TYPE_VIDEO_MPEG4; + break; + 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; |