summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_jpeg.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-09-11 12:46:44 +0300
committerMartin Storsjö <martin@martin.st>2012-09-12 12:09:02 +0300
commitc64d2a63df5d7cd309c184bd0bd33dd2cb1259b1 (patch)
treebd6ff01c0057ba32db0ad72c45bd13b098e9a9aa /libavformat/rtpdec_jpeg.c
parent20f325f320c6e18ee88983870d2a1fee94257293 (diff)
rtpdec_jpeg: Don't use a bitstream writer for the EOI marker
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_jpeg.c')
-rw-r--r--libavformat/rtpdec_jpeg.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 4f52c31b9f..4d8523dcb2 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. */