set correct ftyp minor version for 3gp/2
Originally committed as revision 13774 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6ba9ed9557
commit
40f8675ccf
@ -1379,6 +1379,7 @@ static int mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
|
|||||||
MOVContext *mov = s->priv_data;
|
MOVContext *mov = s->priv_data;
|
||||||
offset_t pos = url_ftell(pb);
|
offset_t pos = url_ftell(pb);
|
||||||
int has_h264 = 0, has_video = 0;
|
int has_h264 = 0, has_video = 0;
|
||||||
|
int minor = 0x200;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < s->nb_streams; i++) {
|
for (i = 0; i < s->nb_streams; i++) {
|
||||||
@ -1392,11 +1393,13 @@ static int mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
|
|||||||
put_be32(pb, 0); /* size */
|
put_be32(pb, 0); /* size */
|
||||||
put_tag(pb, "ftyp");
|
put_tag(pb, "ftyp");
|
||||||
|
|
||||||
if (mov->mode == MODE_3GP)
|
if (mov->mode == MODE_3GP) {
|
||||||
put_tag(pb, has_h264 ? "3gp6":"3gp4");
|
put_tag(pb, has_h264 ? "3gp6" : "3gp4");
|
||||||
else if (mov->mode & MODE_3G2)
|
minor = has_h264 ? 0x100 : 0x200;
|
||||||
put_tag(pb, has_h264 ? "3g2b":"3g2a");
|
} else if (mov->mode & MODE_3G2) {
|
||||||
else if (mov->mode == MODE_PSP)
|
put_tag(pb, has_h264 ? "3g2b" : "3g2a");
|
||||||
|
minor = has_h264 ? 0x20000 : 0x10000;
|
||||||
|
}else if (mov->mode == MODE_PSP)
|
||||||
put_tag(pb, "MSNV");
|
put_tag(pb, "MSNV");
|
||||||
else if (mov->mode == MODE_MP4)
|
else if (mov->mode == MODE_MP4)
|
||||||
put_tag(pb, "isom");
|
put_tag(pb, "isom");
|
||||||
@ -1405,7 +1408,7 @@ static int mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
|
|||||||
else
|
else
|
||||||
put_tag(pb, "qt ");
|
put_tag(pb, "qt ");
|
||||||
|
|
||||||
put_be32(pb, 0x200);
|
put_be32(pb, minor);
|
||||||
|
|
||||||
if(mov->mode == MODE_MOV)
|
if(mov->mode == MODE_MOV)
|
||||||
put_tag(pb, "qt ");
|
put_tag(pb, "qt ");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user