Commit 9e282ba3 authored by Michael Niedermayer's avatar Michael Niedermayer

the PSP rejects video with too high bitrates so lets claim they arent too high ...

Originally committed as revision 5267 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7b748aff
...@@ -1510,6 +1510,8 @@ static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s) ...@@ -1510,6 +1510,8 @@ static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)
AVCodecContext *AudioCodec = s->streams[1]->codec; AVCodecContext *AudioCodec = s->streams[1]->codec;
int AudioRate = AudioCodec->sample_rate; int AudioRate = AudioCodec->sample_rate;
int FrameRate = ((VideoCodec->time_base.den) * (0x10000))/ (VideoCodec->time_base.num); int FrameRate = ((VideoCodec->time_base.den) * (0x10000))/ (VideoCodec->time_base.num);
int audio_kbitrate= AudioCodec->bit_rate / 1000;
int video_kbitrate= FFMIN(VideoCodec->bit_rate / 1000, 800 - audio_kbitrate);
put_be32(pb, 0x94 ); /* size */ put_be32(pb, 0x94 ); /* size */
put_tag(pb, "uuid"); put_tag(pb, "uuid");
...@@ -1535,8 +1537,8 @@ static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s) ...@@ -1535,8 +1537,8 @@ static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)
put_tag(pb, "mp4a"); put_tag(pb, "mp4a");
put_be32(pb, 0x20f ); put_be32(pb, 0x20f );
put_be32(pb, 0x0 ); put_be32(pb, 0x0 );
put_be32(pb, AudioCodec->bit_rate / 1000); put_be32(pb, audio_kbitrate);
put_be32(pb, AudioCodec->bit_rate / 1000); put_be32(pb, audio_kbitrate);
put_be32(pb, AudioRate ); put_be32(pb, AudioRate );
put_be32(pb, AudioCodec->channels ); put_be32(pb, AudioCodec->channels );
...@@ -1547,8 +1549,8 @@ static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s) ...@@ -1547,8 +1549,8 @@ static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)
put_tag(pb, "mp4v"); put_tag(pb, "mp4v");
put_be32(pb, 0x103 ); put_be32(pb, 0x103 );
put_be32(pb, 0x0 ); put_be32(pb, 0x0 );
put_be32(pb, VideoCodec->bit_rate / 1000); put_be32(pb, video_kbitrate);
put_be32(pb, VideoCodec->bit_rate / 1000); put_be32(pb, video_kbitrate);
put_be32(pb, FrameRate); put_be32(pb, FrameRate);
put_be32(pb, FrameRate); put_be32(pb, FrameRate);
put_be16(pb, VideoCodec->width); put_be16(pb, VideoCodec->width);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment