]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/flvenc.c
Add some const keywords in rtjpeg decoder
[ffmpeg] / libavformat / flvenc.c
index 2adc303232d792732350c25f69fb97e2f530f1a0..2842faf5b25c98c5aae196bfa217140f49843369 100644 (file)
@@ -126,7 +126,7 @@ static void put_amf_bool(ByteIOContext *pb, int b) {
 
 static int flv_write_header(AVFormatContext *s)
 {
-    ByteIOContext *pb = &s->pb;
+    ByteIOContext *pb = s->pb;
     FLVContext *flv = s->priv_data;
     int i, width, height, samplerate, samplesize, channels, audiocodecid, videocodecid;
     double framerate = 0.0;
@@ -256,7 +256,7 @@ static int flv_write_trailer(AVFormatContext *s)
 {
     int64_t file_size;
 
-    ByteIOContext *pb = &s->pb;
+    ByteIOContext *pb = s->pb;
     FLVContext *flv = s->priv_data;
 
     file_size = url_ftell(pb);
@@ -273,7 +273,7 @@ static int flv_write_trailer(AVFormatContext *s)
 
 static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
-    ByteIOContext *pb = &s->pb;
+    ByteIOContext *pb = s->pb;
     AVCodecContext *enc = s->streams[pkt->stream_index]->codec;
     FLVContext *flv = s->priv_data;
     int size= pkt->size;
@@ -307,7 +307,8 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
 
     put_be24(pb,size + flags_size);
     put_be24(pb,pkt->pts);
-    put_be32(pb,flv->reserved);
+    put_byte(pb,pkt->pts >> 24);
+    put_be24(pb,flv->reserved);
     put_byte(pb,flags);
     if (enc->codec_id == CODEC_ID_VP6)
         put_byte(pb,0);