/*
* FFM (ffserver live feed) muxer
- * Copyright (c) 2001 Fabrice Bellard.
+ * Copyright (c) 2001 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "ffm.h"
/* header */
put_le32(pb, MKTAG('F', 'F', 'M', '1'));
put_be32(pb, ffm->packet_size);
- /* XXX: store write position in other file ? */
- put_be64(pb, ffm->packet_size); /* current write position */
+ put_be64(pb, 0); /* current write position */
put_be32(pb, s->nb_streams);
bit_rate = 0;
put_be16(pb, (int) (codec->qcompress * 10000.0));
put_be16(pb, (int) (codec->qblur * 10000.0));
put_be32(pb, codec->bit_rate_tolerance);
- put_strz(pb, codec->rc_eq);
+ put_strz(pb, codec->rc_eq ? codec->rc_eq : "tex^qComp");
put_be32(pb, codec->rc_max_rate);
put_be32(pb, codec->rc_min_rate);
put_be32(pb, codec->rc_buffer_size);
put_flush_packet(pb);
- if (!url_is_streamed(pb)) {
- int64_t size;
- /* update the write offset */
- size = url_ftell(pb);
- url_fseek(pb, 8, SEEK_SET);
- put_be64(pb, size);
- put_flush_packet(pb);
- }
-
return 0;
}
AVOutputFormat ffm_muxer = {
"ffm",
- NULL_IF_CONFIG_SMALL("ffm format"),
+ NULL_IF_CONFIG_SMALL("FFM (FFserver live feed) format"),
"",
"ffm",
sizeof(FFMContext),