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

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

Issue 2850032: ffmpeg update to june 23 version which fixes mp4 crash on still frames with 3... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 6 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
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/oma.c ('k') | source/patched-ffmpeg-mt/libavformat/raw.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Libavformat API example: Output a media file in any supported 2 * Libavformat API example: Output a media file in any supported
3 * libavformat format. The default codecs are used. 3 * libavformat format. The default codecs are used.
4 * 4 *
5 * Copyright (c) 2003 Fabrice Bellard 5 * Copyright (c) 2003 Fabrice Bellard
6 * 6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal 8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights 9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if (!st) { 61 if (!st) {
62 fprintf(stderr, "Could not alloc stream\n"); 62 fprintf(stderr, "Could not alloc stream\n");
63 exit(1); 63 exit(1);
64 } 64 }
65 65
66 c = st->codec; 66 c = st->codec;
67 c->codec_id = codec_id; 67 c->codec_id = codec_id;
68 c->codec_type = AVMEDIA_TYPE_AUDIO; 68 c->codec_type = AVMEDIA_TYPE_AUDIO;
69 69
70 /* put sample parameters */ 70 /* put sample parameters */
71 c->sample_fmt = SAMPLE_FMT_S16;
71 c->bit_rate = 64000; 72 c->bit_rate = 64000;
72 c->sample_rate = 44100; 73 c->sample_rate = 44100;
73 c->channels = 2; 74 c->channels = 2;
74 75
75 // some formats want stream headers to be separate 76 // some formats want stream headers to be separate
76 if(oc->oformat->flags & AVFMT_GLOBALHEADER) 77 if(oc->oformat->flags & AVFMT_GLOBALHEADER)
77 c->flags |= CODEC_FLAG_GLOBAL_HEADER; 78 c->flags |= CODEC_FLAG_GLOBAL_HEADER;
78 79
79 return st; 80 return st;
80 } 81 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 if (!(fmt->flags & AVFMT_NOFILE)) { 546 if (!(fmt->flags & AVFMT_NOFILE)) {
546 /* close the output file */ 547 /* close the output file */
547 url_fclose(oc->pb); 548 url_fclose(oc->pb);
548 } 549 }
549 550
550 /* free the stream */ 551 /* free the stream */
551 av_free(oc); 552 av_free(oc);
552 553
553 return 0; 554 return 0;
554 } 555 }
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/oma.c ('k') | source/patched-ffmpeg-mt/libavformat/raw.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698