[FFmpeg-cvslog] r13880 - in trunk: libavformat/ffmenc.c tests/libav.regression.ref

bcoudurier subversion
Sun Jun 22 10:50:57 CEST 2008


Author: bcoudurier
Date: Sun Jun 22 10:50:57 2008
New Revision: 13880

Log:
store dts in ffm headers

Modified:
   trunk/libavformat/ffmenc.c
   trunk/tests/libav.regression.ref

Modified: trunk/libavformat/ffmenc.c
==============================================================================
--- trunk/libavformat/ffmenc.c	(original)
+++ trunk/libavformat/ffmenc.c	Sun Jun 22 10:50:57 2008
@@ -188,11 +188,11 @@ static int ffm_write_header(AVFormatCont
 
 static int ffm_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
-    int64_t pts;
+    int64_t dts;
     uint8_t header[FRAME_HEADER_SIZE];
     int header_size = FRAME_HEADER_SIZE;
 
-    pts = s->timestamp + pkt->pts;
+    dts = s->timestamp + pkt->dts;
     /* packet size & key_frame */
     header[0] = pkt->stream_index;
     header[1] = 0;
@@ -200,14 +200,14 @@ static int ffm_write_packet(AVFormatCont
         header[1] |= FLAG_KEY_FRAME;
     AV_WB24(header+2, pkt->size);
     AV_WB24(header+5, pkt->duration);
-    AV_WB64(header+8, pts);
+    AV_WB64(header+8, s->timestamp + pkt->pts);
     if (pkt->pts != pkt->dts) {
         header[1] |= FLAG_DTS;
         AV_WB32(header+16, pkt->pts - pkt->dts);
         header_size += 4;
     }
-    ffm_write_data(s, header, header_size, pts, 1);
-    ffm_write_data(s, pkt->data, pkt->size, pts, 0);
+    ffm_write_data(s, header, header_size, dts, 1);
+    ffm_write_data(s, pkt->data, pkt->size, dts, 0);
 
     return 0;
 }

Modified: trunk/tests/libav.regression.ref
==============================================================================
--- trunk/tests/libav.regression.ref	(original)
+++ trunk/tests/libav.regression.ref	Sun Jun 22 10:50:57 2008
@@ -15,7 +15,7 @@ bdb7484c68db722f66ba1630cf79844c *./test
 d6fdeb9f7083cc827f9510c6c4517dc0 *./tests/data/b-libav.swf
 335771 ./tests/data/b-libav.swf
 ./tests/data/b-libav.swf CRC=0xe14e8847
-11eec620bdcd3ef1a053fdb964d1b855 *./tests/data/b-libav.ffm
+3dbacdc3fccb551f8ab54c32f648e7a8 *./tests/data/b-libav.ffm
 380928 ./tests/data/b-libav.ffm
 ./tests/data/b-libav.ffm CRC=0x2b71a386
 f8ad5bd78f4d012a8ce9570aa395ac54 *./tests/data/b-libav.flv




More information about the ffmpeg-cvslog mailing list