diff mpegtsenc.c @ 2771:d52c718e83f9 libavformat

Use dynamically allocated ByteIOContext in AVFormatContext patch by: Bj«Órn Axelsson, bjorn d axelsson a intinor d se thread: [PATCH] Remove static ByteIOContexts, 06 nov 2007
author andoma
date Wed, 21 Nov 2007 07:41:00 +0000
parents d1af40ab8ea5
children c31c50af40c5
line wrap: on
line diff
--- a/mpegtsenc.c	Mon Nov 19 20:28:11 2007 +0000
+++ b/mpegtsenc.c	Wed Nov 21 07:41:00 2007 +0000
@@ -353,7 +353,7 @@
 static void section_write_packet(MpegTSSection *s, const uint8_t *packet)
 {
     AVFormatContext *ctx = s->opaque;
-    put_buffer(&ctx->pb, packet, TS_PACKET_SIZE);
+    put_buffer(ctx->pb, packet, TS_PACKET_SIZE);
 }
 
 static int mpegts_write_header(AVFormatContext *s)
@@ -431,7 +431,7 @@
     for(i = 0; i < ts->nb_services; i++) {
         mpegts_write_pmt(s, ts->services[i]);
     }
-    put_flush_packet(&s->pb);
+    put_flush_packet(s->pb);
 
     return 0;
 
@@ -608,9 +608,9 @@
         memcpy(buf + TS_PACKET_SIZE - len, payload, len);
         payload += len;
         payload_size -= len;
-        put_buffer(&s->pb, buf, TS_PACKET_SIZE);
+        put_buffer(s->pb, buf, TS_PACKET_SIZE);
     }
-    put_flush_packet(&s->pb);
+    put_flush_packet(s->pb);
 }
 
 static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
@@ -668,7 +668,7 @@
                              ts_st->payload_pts, ts_st->payload_dts);
         }
     }
-    put_flush_packet(&s->pb);
+    put_flush_packet(s->pb);
 
     for(i = 0; i < ts->nb_services; i++) {
         service = ts->services[i];