]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/flacenc_header.c
rtmp: do not warn about receiving metadata packets
[ffmpeg] / libavformat / flacenc_header.c
index fa7ed482416c26ba2fa599e9121ef65a2e36d220..c1f7c86554b8ec7402e7a5f86ed57043516e6343 100644 (file)
@@ -2,20 +2,20 @@
  * raw FLAC muxer
  * Copyright (C) 2009 Justin Ruggles
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -34,16 +34,14 @@ int ff_flac_write_header(AVIOContext *pb, AVCodecContext *codec,
     enum FLACExtradataFormat format;
 
     header[4] = last_block ? 0x80 : 0x00;
-    if (!ff_flac_is_extradata_valid(codec, &format, &streaminfo))
+    if (!avpriv_flac_is_extradata_valid(codec, &format, &streaminfo))
         return -1;
 
-    /* write "fLaC" stream marker and first metadata block header if needed */
-    if (format == FLAC_EXTRADATA_FORMAT_STREAMINFO) {
-        put_buffer(pb, header, 8);
-    }
+    /* write "fLaC" stream marker and first metadata block header */
+    avio_write(pb, header, 8);
 
-    /* write STREAMINFO or full header */
-    put_buffer(pb, codec->extradata, codec->extradata_size);
+    /* write STREAMINFO */
+    avio_write(pb, streaminfo, FLAC_STREAMINFO_SIZE);
 
     return 0;
 }