# HG changeset patch # User bcoudurier # Date 1213477679 0 # Node ID 0edcd0638eccd1476a6c9c7688ef25329827e173 # Parent a7ba44edfacbc5074cf4affbd59e0f8a84f0e919 simplify ipod brand selection diff -r a7ba44edfacb -r 0edcd0638ecc movenc.c --- a/movenc.c Sat Jun 14 21:06:10 2008 +0000 +++ b/movenc.c Sat Jun 14 21:07:59 2008 +0000 @@ -1378,11 +1378,13 @@ { MOVContext *mov = s->priv_data; offset_t pos = url_ftell(pb); - int has_h264 = 0; + int has_h264 = 0, has_video = 0; int i; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; + if (st->codec->codec_type == CODEC_TYPE_VIDEO) + has_video = 1; if (st->codec->codec_id == CODEC_ID_H264) has_h264 = 1; } @@ -1398,15 +1400,9 @@ put_tag(pb, "MSNV"); else if (mov->mode == MODE_MP4) put_tag(pb, "isom"); - else if (mov->mode == MODE_IPOD) { - for (i = 0; i < s->nb_streams; i++) - if (s->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) { - put_tag(pb, "M4V "); - break; - } - if (i == s->nb_streams) - put_tag(pb, "M4A "); - } else + else if (mov->mode == MODE_IPOD) + put_tag(pb, has_video ? "M4V ":"M4A "); + else put_tag(pb, "qt "); put_be32(pb, 0x200);