mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
finally found what those >138 codes were... crappy compressed 5bit ascii. this gets them correctly, and adds setting track lang in movenc too.
Originally committed as revision 4792 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -52,6 +52,7 @@ typedef struct MOVIndex {
|
||||
long sampleCount;
|
||||
long sampleDuration;
|
||||
int hasKeyframes;
|
||||
int language;
|
||||
int trackID;
|
||||
AVCodecContext *enc;
|
||||
|
||||
@ -72,6 +73,9 @@ typedef struct MOVContext {
|
||||
|
||||
static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack* track);
|
||||
|
||||
/* output language code from iso639 language name */
|
||||
extern int ff_mov_iso639_to_lang(const char *lang, int mp4);
|
||||
|
||||
const CodecTag ff_mov_obj_type[] = {
|
||||
{ CODEC_ID_MPEG4 , 32 },
|
||||
{ CODEC_ID_AAC , 64 },
|
||||
@ -701,7 +705,7 @@ static int mov_write_mdhd_tag(ByteIOContext *pb, MOVTrack* track)
|
||||
put_be32(pb, track->time); /* modification time */
|
||||
put_be32(pb, track->timescale); /* time scale (sample rate for audio) */
|
||||
put_be32(pb, track->trackDuration); /* duration */
|
||||
put_be16(pb, 0); /* language, 0 = english */
|
||||
put_be16(pb, track->language); /* language */
|
||||
put_be16(pb, 0); /* reserved (quality) */
|
||||
return 32;
|
||||
}
|
||||
@ -1331,6 +1335,8 @@ static int mov_write_header(AVFormatContext *s)
|
||||
av_log(s, AV_LOG_INFO, "Warning, using MS style audio codec tag, the file may be unplayable!\n");
|
||||
}
|
||||
}
|
||||
/* don't know yet if mp4 or not */
|
||||
mov->tracks[i].language = ff_mov_iso639_to_lang(s->streams[i]->language, 1);
|
||||
}
|
||||
|
||||
/* Default mode == MP4 */
|
||||
|
Reference in New Issue
Block a user