mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-16 11:47:04 +00:00
avformat/mpjpegdec: remove extra newlines
This commit is contained in:
parent
1735ca3c41
commit
8042f658f7
@ -26,8 +26,6 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "avio_internal.h"
|
#include "avio_internal.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct MPJPEGDemuxContext {
|
typedef struct MPJPEGDemuxContext {
|
||||||
const AVClass *class;
|
const AVClass *class;
|
||||||
char *boundary;
|
char *boundary;
|
||||||
@ -36,7 +34,6 @@ typedef struct MPJPEGDemuxContext {
|
|||||||
int strict_mime_boundary;
|
int strict_mime_boundary;
|
||||||
} MPJPEGDemuxContext;
|
} MPJPEGDemuxContext;
|
||||||
|
|
||||||
|
|
||||||
static void trim_right(char *p)
|
static void trim_right(char *p)
|
||||||
{
|
{
|
||||||
char *end;
|
char *end;
|
||||||
@ -63,8 +60,6 @@ static int get_line(AVIOContext *pb, char *line, int line_size)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int split_tag_value(char **tag, char **value, char *line)
|
static int split_tag_value(char **tag, char **value, char *line)
|
||||||
{
|
{
|
||||||
char *p = line;
|
char *p = line;
|
||||||
@ -73,7 +68,6 @@ static int split_tag_value(char **tag, char **value, char *line)
|
|||||||
*tag = NULL;
|
*tag = NULL;
|
||||||
*value = NULL;
|
*value = NULL;
|
||||||
|
|
||||||
|
|
||||||
while (*p != '\0' && *p != ':') {
|
while (*p != '\0' && *p != ':') {
|
||||||
if (!av_isspace(*p)) {
|
if (!av_isspace(*p)) {
|
||||||
foundData = 1;
|
foundData = 1;
|
||||||
@ -245,7 +239,6 @@ static int parse_multipart_header(AVIOContext *pb,
|
|||||||
return found_content_type ? 0 : AVERROR_INVALIDDATA;
|
return found_content_type ? 0 : AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static char* mpjpeg_get_boundary(AVIOContext* pb)
|
static char* mpjpeg_get_boundary(AVIOContext* pb)
|
||||||
{
|
{
|
||||||
uint8_t *mime_type = NULL;
|
uint8_t *mime_type = NULL;
|
||||||
@ -289,7 +282,6 @@ static char* mpjpeg_get_boundary(AVIOContext* pb)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
|
static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
@ -318,8 +310,6 @@ static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = parse_multipart_header(s->pb, &size, mpjpeg->boundary, s);
|
ret = parse_multipart_header(s->pb, &size, mpjpeg->boundary, s);
|
||||||
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -365,14 +355,12 @@ static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define OFFSET(x) offsetof(MPJPEGDemuxContext, x)
|
#define OFFSET(x) offsetof(MPJPEGDemuxContext, x)
|
||||||
|
|
||||||
#define DEC AV_OPT_FLAG_DECODING_PARAM
|
#define DEC AV_OPT_FLAG_DECODING_PARAM
|
||||||
static const AVOption mpjpeg_options[] = {
|
static const AVOption mpjpeg_options[] = {
|
||||||
{ "strict_mime_boundary", "require MIME boundaries match", OFFSET(strict_mime_boundary), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DEC },
|
{ "strict_mime_boundary", "require MIME boundaries match", OFFSET(strict_mime_boundary), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DEC },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static const AVClass mpjpeg_demuxer_class = {
|
static const AVClass mpjpeg_demuxer_class = {
|
||||||
.class_name = "MPJPEG demuxer",
|
.class_name = "MPJPEG demuxer",
|
||||||
.item_name = av_default_item_name,
|
.item_name = av_default_item_name,
|
||||||
@ -393,5 +381,3 @@ const AVInputFormat ff_mpjpeg_demuxer = {
|
|||||||
.priv_class = &mpjpeg_demuxer_class,
|
.priv_class = &mpjpeg_demuxer_class,
|
||||||
.flags = AVFMT_NOTIMESTAMPS,
|
.flags = AVFMT_NOTIMESTAMPS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user