* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/fifo.h"
+#include "libavcodec/bitstream.h"
#include "avformat.h"
-#include "bitstream.h"
-#include "fifo.h"
#include "mpeg.h"
#define MAX_PAYLOAD_SIZE 4096
}
/* output data */
- if(av_fifo_generic_read(&stream->fifo, payload_size - stuffing_size, &put_buffer, ctx->pb) < 0)
- return -1;
+ assert(payload_size - stuffing_size <= av_fifo_size(&stream->fifo));
+ av_fifo_generic_read(&stream->fifo, payload_size - stuffing_size, &put_buffer, ctx->pb);
stream->bytes_to_iframe -= payload_size - stuffing_size;
}else{
payload_size=
MpegMuxContext *s = ctx->priv_data;
AVStream *st;
StreamInfo *stream;
- int i, avail_space, es_size, trailer_size;
+ int i, avail_space=0, es_size, trailer_size;
int best_i= -1;
int best_score= INT_MIN;
int ignore_constraints=0;
stream->predecode_packet= pkt_desc;
stream->next_packet= &pkt_desc->next;
- av_fifo_realloc(&stream->fifo, av_fifo_size(&stream->fifo) + size + 1);
+ av_fifo_realloc(&stream->fifo, av_fifo_size(&stream->fifo) + size);
if (s->is_dvd){
if (is_iframe && (s->packet_number == 0 || (pts - stream->vobu_start_pts >= 36000))) { // min VOBU length 0.4 seconds (mpucoder)
}
}
- av_fifo_write(&stream->fifo, buf, size);
+ av_fifo_generic_write(&stream->fifo, buf, size, NULL);
for(;;){
int ret= output_packet(ctx, 0);
#ifdef CONFIG_MPEG1SYSTEM_MUXER
AVOutputFormat mpeg1system_muxer = {
"mpeg",
- "MPEG1 System format",
+ NULL_IF_CONFIG_SMALL("MPEG-1 System format"),
"video/mpeg",
"mpg,mpeg",
sizeof(MpegMuxContext),
#ifdef CONFIG_MPEG1VCD_MUXER
AVOutputFormat mpeg1vcd_muxer = {
"vcd",
- "MPEG1 System format (VCD)",
+ NULL_IF_CONFIG_SMALL("MPEG-1 System format (VCD)"),
"video/mpeg",
NULL,
sizeof(MpegMuxContext),
#ifdef CONFIG_MPEG2VOB_MUXER
AVOutputFormat mpeg2vob_muxer = {
"vob",
- "MPEG2 PS format (VOB)",
+ NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"),
"video/mpeg",
"vob",
sizeof(MpegMuxContext),
#ifdef CONFIG_MPEG2SVCD_MUXER
AVOutputFormat mpeg2svcd_muxer = {
"svcd",
- "MPEG2 PS format (VOB)",
+ NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"),
"video/mpeg",
"vob",
sizeof(MpegMuxContext),
#ifdef CONFIG_MPEG2DVD_MUXER
AVOutputFormat mpeg2dvd_muxer = {
"dvd",
- "MPEG2 PS format (DVD VOB)",
+ NULL_IF_CONFIG_SMALL("MPEG-2 PS format (DVD VOB)"),
"video/mpeg",
"dvd",
sizeof(MpegMuxContext),