* Copyright (c) 2006 Baptiste Coudurier <baptiste.coudurier@smartjog.com>
* Mans Rullgard <mru@inprovide.com>
*
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg 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 this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
ADTSContext *adts = s->priv_data;
ByteIOContext *pb = &s->pb;
+ if (!pkt->size)
+ return 0;
if(adts->write_adts)
adts_write_frame_header(s, pkt->size);
put_buffer(pb, pkt->data, pkt->size);
+ put_flush_packet(pb);
return 0;
}
-#ifdef CONFIG_MUXERS
-static AVOutputFormat adts_oformat = {
+AVOutputFormat adts_muxer = {
"adts",
"ADTS AAC",
"audio/aac",
adts_write_packet,
adts_write_trailer,
};
-#endif //CONFIG_MUXERS
-
-int ff_adts_init(void)
-{
-#ifdef CONFIG_MUXERS
- av_register_output_format(&adts_oformat);
-#endif //CONFIG_MUXERS
- return 0;
-}