diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-06-21 20:14:58 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-06-21 20:14:58 +0000 |
commit | 4315aa8b05bc9f2865b1357a1e8cbf8f93042313 (patch) | |
tree | 1b953cfba02ef160b8dd570e493f72cd9879773a /libavformat/oggenc.c | |
parent | e9a32230c3e05deff257cbfa1e5e3d86dc0e94e6 (diff) | |
download | ffmpeg-4315aa8b05bc9f2865b1357a1e8cbf8f93042313.tar.gz |
cosmetics: spacing and comments
Originally committed as revision 19246 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggenc.c')
-rw-r--r-- | libavformat/oggenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index efd57e4060..afed87f8b0 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -90,8 +90,11 @@ static int ogg_build_flac_headers(AVCodecContext *avctx, enum FLACExtradataFormat format; uint8_t *streaminfo; uint8_t *p; + if (!ff_flac_is_extradata_valid(avctx, &format, &streaminfo)) return -1; + + // first packet: STREAMINFO oggstream->header_len[0] = 51; oggstream->header[0] = av_mallocz(51); // per ogg flac specs p = oggstream->header[0]; @@ -106,6 +109,8 @@ static int ogg_build_flac_headers(AVCodecContext *avctx, bytestream_put_byte(&p, 0x00); // streaminfo bytestream_put_be24(&p, 34); bytestream_put_buffer(&p, streaminfo, FLAC_STREAMINFO_SIZE); + + // second packet: VorbisComment oggstream->header_len[1] = 1+3+4+strlen(vendor)+4; oggstream->header[1] = av_mallocz(oggstream->header_len[1]); p = oggstream->header[1]; @@ -116,6 +121,7 @@ static int ogg_build_flac_headers(AVCodecContext *avctx, bytestream_put_le32(&p, strlen(vendor)); bytestream_put_buffer(&p, vendor, strlen(vendor)); bytestream_put_le32(&p, 0); // user comment list length + return 0; } |