[05/13] rtpdec_jpeg: Get rid of the bytstream writer for the EOI marker

Message ID 1347363979-4676-5-git-send-email-martin@martin.st
State Committed
Commit c64d2a63df5d7cd309c184bd0bd33dd2cb1259b1
Headers show

Commit Message

Martin Storsjö Sept. 11, 2012, 11:46 a.m.
---
 libavformat/rtpdec_jpeg.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch

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. */