Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Side by Side Diff: source/patched-ffmpeg-mt/libavformat/movenc.c

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * MOV, 3GP, MP4 muxer 2 * MOV, 3GP, MP4 muxer
3 * Copyright (c) 2003 Thomas Raivio 3 * Copyright (c) 2003 Thomas Raivio
4 * Copyright (c) 2004 Gildas Bazin <gbazin at videolan dot org> 4 * Copyright (c) 2004 Gildas Bazin <gbazin at videolan dot org>
5 * Copyright (c) 2009 Baptiste Coudurier <baptiste dot coudurier at gmail dot co m> 5 * Copyright (c) 2009 Baptiste Coudurier <baptiste dot coudurier at gmail dot co m>
6 * 6 *
7 * This file is part of FFmpeg. 7 * This file is part of FFmpeg.
8 * 8 *
9 * FFmpeg is free software; you can redistribute it and/or 9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 } 748 }
749 749
750 static int mov_write_pasp_tag(ByteIOContext *pb, MOVTrack *track) 750 static int mov_write_pasp_tag(ByteIOContext *pb, MOVTrack *track)
751 { 751 {
752 AVRational sar; 752 AVRational sar;
753 av_reduce(&sar.num, &sar.den, track->enc->sample_aspect_ratio.num, 753 av_reduce(&sar.num, &sar.den, track->enc->sample_aspect_ratio.num,
754 track->enc->sample_aspect_ratio.den, INT_MAX); 754 track->enc->sample_aspect_ratio.den, INT_MAX);
755 755
756 put_be32(pb, 16); 756 put_be32(pb, 16);
757 put_tag(pb, "pasp"); 757 put_tag(pb, "pasp");
758 put_be32(pb, track->enc->sample_aspect_ratio.num); 758 put_be32(pb, sar.num);
759 put_be32(pb, track->enc->sample_aspect_ratio.den); 759 put_be32(pb, sar.den);
760 return 16; 760 return 16;
761 } 761 }
762 762
763 static int mov_write_video_tag(ByteIOContext *pb, MOVTrack *track) 763 static int mov_write_video_tag(ByteIOContext *pb, MOVTrack *track)
764 { 764 {
765 int64_t pos = url_ftell(pb); 765 int64_t pos = url_ftell(pb);
766 char compressor_name[32]; 766 char compressor_name[32];
767 767
768 put_be32(pb, 0); /* size */ 768 put_be32(pb, 0); /* size */
769 put_le32(pb, track->tag); // store it byteswapped 769 put_le32(pb, track->tag); // store it byteswapped
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 put_be32(pb, 0x1); 1256 put_be32(pb, 0x1);
1257 put_be32(pb, 0x0); 1257 put_be32(pb, 0x0);
1258 return 0x34; 1258 return 0x34;
1259 } 1259 }
1260 1260
1261 static int mov_write_udta_sdp(ByteIOContext *pb, AVCodecContext *ctx, int index) 1261 static int mov_write_udta_sdp(ByteIOContext *pb, AVCodecContext *ctx, int index)
1262 { 1262 {
1263 char buf[1000] = ""; 1263 char buf[1000] = "";
1264 int len; 1264 int len;
1265 1265
1266 ff_sdp_write_media(buf, sizeof(buf), ctx, NULL, 0, 0); 1266 ff_sdp_write_media(buf, sizeof(buf), ctx, NULL, NULL, 0, 0);
1267 av_strlcatf(buf, sizeof(buf), "a=control:streamid=%d\r\n", index); 1267 av_strlcatf(buf, sizeof(buf), "a=control:streamid=%d\r\n", index);
1268 len = strlen(buf); 1268 len = strlen(buf);
1269 1269
1270 put_be32(pb, len + 24); 1270 put_be32(pb, len + 24);
1271 put_tag (pb, "udta"); 1271 put_tag (pb, "udta");
1272 put_be32(pb, len + 16); 1272 put_be32(pb, len + 16);
1273 put_tag (pb, "hnti"); 1273 put_tag (pb, "hnti");
1274 put_be32(pb, len + 8); 1274 put_be32(pb, len + 8);
1275 put_tag (pb, "sdp "); 1275 put_tag (pb, "sdp ");
1276 put_buffer(pb, buf, len); 1276 put_buffer(pb, buf, len);
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2291 sizeof(MOVMuxContext), 2291 sizeof(MOVMuxContext),
2292 CODEC_ID_AAC, 2292 CODEC_ID_AAC,
2293 CODEC_ID_H264, 2293 CODEC_ID_H264,
2294 mov_write_header, 2294 mov_write_header,
2295 ff_mov_write_packet, 2295 ff_mov_write_packet,
2296 mov_write_trailer, 2296 mov_write_trailer,
2297 .flags = AVFMT_GLOBALHEADER, 2297 .flags = AVFMT_GLOBALHEADER,
2298 .codec_tag = (const AVCodecTag* const []){codec_ipod_tags, 0}, 2298 .codec_tag = (const AVCodecTag* const []){codec_ipod_tags, 0},
2299 }; 2299 };
2300 #endif 2300 #endif
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/mov.c ('k') | source/patched-ffmpeg-mt/libavformat/mpegts.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698