summaryrefslogtreecommitdiff
path: root/libavformat/mpjpegdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mpjpegdec.c')
-rw-r--r--libavformat/mpjpegdec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index c0ffaf616e..24bf232db2 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -302,8 +302,9 @@ static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
boundary = mpjpeg_get_boundary(s->pb);
}
if (boundary != NULL) {
- mpjpeg->boundary = boundary;
- mpjpeg->searchstr = av_asprintf( "\r\n%s\r\n", boundary );
+ mpjpeg->boundary = av_asprintf("--%s", boundary);
+ mpjpeg->searchstr = av_asprintf("\r\n--%s\r\n", boundary);
+ av_freep(&boundary);
} else {
mpjpeg->boundary = av_strdup("--");
mpjpeg->searchstr = av_strdup("\r\n--");