[libav-commits] rtpdec_jpeg: Don't use a bitstream writer for the EOI marker

Martin Storsjö git at libav.org
Wed Sep 12 11:15:58 CEST 2012


Module: libav
Branch: master
Commit: c64d2a63df5d7cd309c184bd0bd33dd2cb1259b1

Author:    Martin Storsjö <martin at martin.st>
Committer: Martin Storsjö <martin at martin.st>
Date:      Tue Sep 11 12:46:44 2012 +0300

rtpdec_jpeg: Don't use a bitstream writer for the EOI marker

Signed-off-by: Martin Storsjö <martin at martin.st>

---

 libavformat/rtpdec_jpeg.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 4f52c31b..4d8523d 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -334,13 +334,9 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
 
     if (flags & RTP_FLAG_MARKER) {
         /* End of JPEG data packet. */
-        PutBitContext pbc;
-        uint8_t buf[2];
+        uint8_t buf[2] = { 0xff, EOI };
 
         /* Put EOI marker. */
-        init_put_bits(&pbc, buf, sizeof(buf));
-        put_marker(&pbc, EOI);
-        flush_put_bits(&pbc);
         avio_write(jpeg->frame, buf, sizeof(buf));
 
         /* Prepare the JPEG packet. */



More information about the libav-commits mailing list