2015-05-16 17:03:28 +02:00
|
|
|
/*
|
|
|
|
* Multipart JPEG format
|
|
|
|
* Copyright (c) 2015 Luca Barbato
|
|
|
|
*
|
2015-06-08 00:44:28 +02:00
|
|
|
* This file is part of FFmpeg.
|
2015-05-16 17:03:28 +02:00
|
|
|
*
|
2015-06-08 00:44:28 +02:00
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2015-05-16 17:03:28 +02:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
2015-06-08 00:44:28 +02:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2015-05-16 17:03:28 +02:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2015-06-08 00:44:28 +02:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2015-05-16 17:03:28 +02:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "libavutil/avstring.h"
|
2015-11-30 01:54:14 +02:00
|
|
|
#include "libavutil/opt.h"
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
#include "avformat.h"
|
|
|
|
#include "internal.h"
|
2015-11-30 01:36:20 +02:00
|
|
|
#include "avio_internal.h"
|
2015-05-16 17:03:28 +02:00
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct MPJPEGDemuxContext {
|
2015-11-30 01:54:14 +02:00
|
|
|
const AVClass *class;
|
2015-11-30 01:36:20 +02:00
|
|
|
char *boundary;
|
|
|
|
char *searchstr;
|
|
|
|
int searchstr_len;
|
2015-11-30 01:54:14 +02:00
|
|
|
int strict_mime_boundary;
|
2015-11-30 01:36:20 +02:00
|
|
|
} MPJPEGDemuxContext;
|
|
|
|
|
|
|
|
|
|
|
|
static void trim_right(char *p)
|
2015-05-16 17:03:28 +02:00
|
|
|
{
|
2015-12-03 06:39:47 +02:00
|
|
|
char *end;
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
if (!p || !*p)
|
|
|
|
return;
|
|
|
|
|
2015-12-03 06:39:47 +02:00
|
|
|
end = p + strlen(p);
|
2015-11-30 01:36:20 +02:00
|
|
|
while (end > p && av_isspace(*(end-1)))
|
|
|
|
*(--end) = '\0';
|
|
|
|
}
|
2015-05-16 17:03:28 +02:00
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
static int get_line(AVIOContext *pb, char *line, int line_size)
|
|
|
|
{
|
|
|
|
ff_get_line(pb, line, line_size);
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
if (pb->error)
|
|
|
|
return pb->error;
|
|
|
|
|
|
|
|
if (pb->eof_reached)
|
|
|
|
return AVERROR_EOF;
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
trim_right(line);
|
2015-05-16 17:03:28 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-09-13 01:07:53 +02:00
|
|
|
|
|
|
|
|
2015-05-16 17:03:28 +02:00
|
|
|
static int split_tag_value(char **tag, char **value, char *line)
|
|
|
|
{
|
|
|
|
char *p = line;
|
2015-09-13 01:04:26 +02:00
|
|
|
int foundData = 0;
|
2015-05-16 17:03:28 +02:00
|
|
|
|
2015-09-13 01:04:26 +02:00
|
|
|
*tag = NULL;
|
|
|
|
*value = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
while (*p != '\0' && *p != ':') {
|
|
|
|
if (!av_isspace(*p)) {
|
|
|
|
foundData = 1;
|
|
|
|
}
|
2015-05-16 17:03:28 +02:00
|
|
|
p++;
|
2015-09-13 01:04:26 +02:00
|
|
|
}
|
2015-05-16 17:03:28 +02:00
|
|
|
if (*p != ':')
|
2015-09-13 01:04:26 +02:00
|
|
|
return foundData ? AVERROR_INVALIDDATA : 0;
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
*p = '\0';
|
|
|
|
*tag = line;
|
2015-09-13 01:07:53 +02:00
|
|
|
trim_right(*tag);
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
p++;
|
|
|
|
|
|
|
|
while (av_isspace(*p))
|
|
|
|
p++;
|
|
|
|
|
|
|
|
*value = p;
|
2015-09-13 01:07:53 +02:00
|
|
|
trim_right(*value);
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
static int parse_multipart_header(AVIOContext *pb,
|
|
|
|
int* size,
|
|
|
|
const char* expected_boundary,
|
|
|
|
void *log_ctx);
|
|
|
|
|
|
|
|
static int mpjpeg_read_close(AVFormatContext *s)
|
|
|
|
{
|
|
|
|
MPJPEGDemuxContext *mpjpeg = s->priv_data;
|
|
|
|
av_freep(&mpjpeg->boundary);
|
|
|
|
av_freep(&mpjpeg->searchstr);
|
|
|
|
return 0;
|
|
|
|
}
|
2015-09-13 22:47:54 +02:00
|
|
|
|
2015-05-16 17:03:28 +02:00
|
|
|
static int mpjpeg_read_probe(AVProbeData *p)
|
|
|
|
{
|
|
|
|
AVIOContext *pb;
|
|
|
|
int ret = 0;
|
2015-11-30 01:36:20 +02:00
|
|
|
int size = 0;
|
2015-05-16 17:03:28 +02:00
|
|
|
|
2015-06-08 22:39:38 +02:00
|
|
|
if (p->buf_size < 2 || p->buf[0] != '-' || p->buf[1] != '-')
|
|
|
|
return 0;
|
|
|
|
|
2015-05-16 17:03:28 +02:00
|
|
|
pb = avio_alloc_context(p->buf, p->buf_size, 0, NULL, NULL, NULL, NULL);
|
|
|
|
if (!pb)
|
2015-10-22 11:19:45 +02:00
|
|
|
return 0;
|
2015-05-16 17:03:28 +02:00
|
|
|
|
2016-02-14 06:15:20 +02:00
|
|
|
ret = (parse_multipart_header(pb, &size, "--", NULL) >= 0) ? AVPROBE_SCORE_MAX : 0;
|
2015-06-08 22:14:18 +02:00
|
|
|
|
2017-09-01 07:16:33 +02:00
|
|
|
avio_context_free(&pb);
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int mpjpeg_read_header(AVFormatContext *s)
|
|
|
|
{
|
|
|
|
AVStream *st;
|
2015-11-30 01:36:20 +02:00
|
|
|
char boundary[70 + 2 + 1] = {0};
|
2015-05-16 17:03:28 +02:00
|
|
|
int64_t pos = avio_tell(s->pb);
|
|
|
|
int ret;
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
do {
|
|
|
|
ret = get_line(s->pb, boundary, sizeof(boundary));
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
} while (!boundary[0]);
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
if (strncmp(boundary, "--", 2))
|
|
|
|
return AVERROR_INVALIDDATA;
|
|
|
|
|
|
|
|
st = avformat_new_stream(s, NULL);
|
2015-06-27 23:19:36 +02:00
|
|
|
if (!st)
|
|
|
|
return AVERROR(ENOMEM);
|
2015-05-16 17:03:28 +02:00
|
|
|
|
lavf: replace AVStream.codec with AVStream.codecpar
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.
In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.
There are multiple important problems with this approach:
- the fields in AVCodecContext are in general one of
* stream parameters
* codec options
* codec state
However, it's not clear which ones are which. It is consequently
unclear which fields are a demuxer allowed to set or a muxer allowed to
read. This leads to erratic behaviour depending on whether decoding or
encoding is being performed or not (and whether it uses the AVStream
embedded codec context).
- various synchronization issues arising from the fact that the same
context is used by several different APIs (muxers/demuxers,
parsers, bitstream filters and encoders/decoders) simultaneously, with
there being no clear rules for who can modify what and the different
processes being typically delayed with respect to each other.
- avformat_find_stream_info() making it necessary to support opening
and closing a single codec context multiple times, thus
complicating the semantics of freeing various allocated objects in the
codec context.
Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2014-06-18 21:42:52 +03:00
|
|
|
st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
|
|
|
|
st->codecpar->codec_id = AV_CODEC_ID_MJPEG;
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
avpriv_set_pts_info(st, 60, 1, 25);
|
|
|
|
|
|
|
|
avio_seek(s->pb, pos, SEEK_SET);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int parse_content_length(const char *value)
|
|
|
|
{
|
|
|
|
long int val = strtol(value, NULL, 10);
|
|
|
|
|
|
|
|
if (val == LONG_MIN || val == LONG_MAX)
|
|
|
|
return AVERROR(errno);
|
|
|
|
if (val > INT_MAX)
|
|
|
|
return AVERROR(ERANGE);
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
static int parse_multipart_header(AVIOContext *pb,
|
|
|
|
int* size,
|
|
|
|
const char* expected_boundary,
|
|
|
|
void *log_ctx)
|
2015-05-16 17:03:28 +02:00
|
|
|
{
|
|
|
|
char line[128];
|
|
|
|
int found_content_type = 0;
|
2015-11-30 01:36:20 +02:00
|
|
|
int ret;
|
|
|
|
|
|
|
|
*size = -1;
|
2015-05-16 17:03:28 +02:00
|
|
|
|
2015-10-22 05:07:05 +02:00
|
|
|
// get the CRLF as empty string
|
2015-09-13 22:47:54 +02:00
|
|
|
ret = get_line(pb, line, sizeof(line));
|
2015-05-16 17:03:28 +02:00
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
2015-10-22 05:07:05 +02:00
|
|
|
/* some implementation do not provide the required
|
|
|
|
* initial CRLF (see rfc1341 7.2.1)
|
|
|
|
*/
|
2015-11-30 01:36:20 +02:00
|
|
|
while (!line[0]) {
|
2015-10-27 13:55:51 +02:00
|
|
|
ret = get_line(pb, line, sizeof(line));
|
2015-10-22 05:07:05 +02:00
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
if (!av_strstart(line, expected_boundary, NULL)) {
|
2016-01-12 21:35:03 +02:00
|
|
|
if (log_ctx)
|
2015-11-30 01:36:20 +02:00
|
|
|
av_log(log_ctx,
|
|
|
|
AV_LOG_ERROR,
|
2016-03-09 15:00:22 +02:00
|
|
|
"Expected boundary '%s' not found, instead found a line of %"SIZE_SPECIFIER" bytes\n",
|
2015-11-30 01:36:20 +02:00
|
|
|
expected_boundary,
|
|
|
|
strlen(line));
|
|
|
|
|
2015-05-16 17:03:28 +02:00
|
|
|
return AVERROR_INVALIDDATA;
|
2015-11-30 01:36:20 +02:00
|
|
|
}
|
2015-05-16 17:03:28 +02:00
|
|
|
|
2015-09-13 22:47:54 +02:00
|
|
|
while (!pb->eof_reached) {
|
2015-05-16 17:03:28 +02:00
|
|
|
char *tag, *value;
|
|
|
|
|
2015-09-13 22:47:54 +02:00
|
|
|
ret = get_line(pb, line, sizeof(line));
|
2015-09-13 02:34:14 +02:00
|
|
|
if (ret < 0) {
|
2015-09-14 17:42:12 +02:00
|
|
|
if (ret == AVERROR_EOF)
|
2015-09-13 02:34:14 +02:00
|
|
|
break;
|
2015-05-16 17:03:28 +02:00
|
|
|
return ret;
|
2015-09-13 02:34:14 +02:00
|
|
|
}
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
if (line[0] == '\0')
|
|
|
|
break;
|
|
|
|
|
|
|
|
ret = split_tag_value(&tag, &value, line);
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
2015-09-13 01:04:26 +02:00
|
|
|
if (value==NULL || tag==NULL)
|
|
|
|
break;
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
if (!av_strcasecmp(tag, "Content-type")) {
|
|
|
|
if (av_strcasecmp(value, "image/jpeg")) {
|
2016-01-12 21:35:03 +02:00
|
|
|
if (log_ctx)
|
2015-11-30 01:36:20 +02:00
|
|
|
av_log(log_ctx, AV_LOG_ERROR,
|
2015-09-13 22:47:54 +02:00
|
|
|
"Unexpected %s : %s\n",
|
|
|
|
tag, value);
|
2015-05-16 17:03:28 +02:00
|
|
|
return AVERROR_INVALIDDATA;
|
|
|
|
} else
|
|
|
|
found_content_type = 1;
|
|
|
|
} else if (!av_strcasecmp(tag, "Content-Length")) {
|
2015-11-30 01:36:20 +02:00
|
|
|
*size = parse_content_length(value);
|
|
|
|
if ( *size < 0 )
|
2016-01-12 21:35:03 +02:00
|
|
|
if (log_ctx)
|
2015-11-30 01:36:20 +02:00
|
|
|
av_log(log_ctx, AV_LOG_WARNING,
|
|
|
|
"Invalid Content-Length value : %s\n",
|
|
|
|
value);
|
2015-05-16 17:03:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
return found_content_type ? 0 : AVERROR_INVALIDDATA;
|
2015-05-16 17:03:28 +02:00
|
|
|
}
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
|
2015-11-30 01:54:14 +02:00
|
|
|
static char* mpjpeg_get_boundary(AVIOContext* pb)
|
|
|
|
{
|
|
|
|
uint8_t *mime_type = NULL;
|
2015-12-04 04:09:00 +02:00
|
|
|
const char *start;
|
|
|
|
const char *end;
|
2015-11-30 01:54:14 +02:00
|
|
|
uint8_t *res = NULL;
|
|
|
|
int len;
|
|
|
|
|
|
|
|
/* get MIME type, and skip to the first parameter */
|
|
|
|
av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type);
|
|
|
|
start = mime_type;
|
|
|
|
while (start != NULL && *start != '\0') {
|
|
|
|
start = strchr(start, ';');
|
2015-12-09 19:48:20 +02:00
|
|
|
if (!start)
|
|
|
|
break;
|
|
|
|
|
|
|
|
start = start+1;
|
2015-11-30 01:54:14 +02:00
|
|
|
|
|
|
|
while (av_isspace(*start))
|
|
|
|
start++;
|
|
|
|
|
|
|
|
if (!av_stristart(start, "boundary=", &start)) {
|
|
|
|
end = strchr(start, ';');
|
|
|
|
if (end)
|
|
|
|
len = end - start - 1;
|
|
|
|
else
|
|
|
|
len = strlen(start);
|
2016-02-12 19:59:29 +02:00
|
|
|
|
|
|
|
/* some endpoints may enclose the boundary
|
|
|
|
in Content-Type in quotes */
|
|
|
|
if ( len>2 && *start == '"' && start[len-1] == '"' ) {
|
|
|
|
start++;
|
|
|
|
len -= 2;
|
|
|
|
}
|
2015-11-30 01:54:14 +02:00
|
|
|
res = av_strndup(start, len);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
av_freep(&mime_type);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-16 17:03:28 +02:00
|
|
|
static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|
|
|
{
|
2015-11-30 01:36:20 +02:00
|
|
|
int size;
|
2015-05-16 17:03:28 +02:00
|
|
|
int ret;
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
MPJPEGDemuxContext *mpjpeg = s->priv_data;
|
|
|
|
if (mpjpeg->boundary == NULL) {
|
2015-11-30 01:54:14 +02:00
|
|
|
uint8_t* boundary = NULL;
|
|
|
|
if (mpjpeg->strict_mime_boundary) {
|
|
|
|
boundary = mpjpeg_get_boundary(s->pb);
|
|
|
|
}
|
|
|
|
if (boundary != NULL) {
|
|
|
|
mpjpeg->boundary = boundary;
|
|
|
|
mpjpeg->searchstr = av_asprintf( "\r\n%s\r\n", boundary );
|
|
|
|
} else {
|
|
|
|
mpjpeg->boundary = av_strdup("--");
|
|
|
|
mpjpeg->searchstr = av_strdup("\r\n--");
|
|
|
|
}
|
2015-11-30 01:36:20 +02:00
|
|
|
if (!mpjpeg->boundary || !mpjpeg->searchstr) {
|
|
|
|
av_freep(&mpjpeg->boundary);
|
|
|
|
av_freep(&mpjpeg->searchstr);
|
|
|
|
return AVERROR(ENOMEM);
|
|
|
|
}
|
|
|
|
mpjpeg->searchstr_len = strlen(mpjpeg->searchstr);
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = parse_multipart_header(s->pb, &size, mpjpeg->boundary, s);
|
|
|
|
|
2015-05-16 17:03:28 +02:00
|
|
|
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
if (size > 0) {
|
|
|
|
/* size has been provided to us in MIME header */
|
|
|
|
ret = av_get_packet(s->pb, pkt, size);
|
|
|
|
} else {
|
|
|
|
/* no size was given -- we read until the next boundary or end-of-file */
|
|
|
|
int remaining = 0, len;
|
|
|
|
|
|
|
|
const int read_chunk = 2048;
|
|
|
|
av_init_packet(pkt);
|
|
|
|
pkt->data = NULL;
|
|
|
|
pkt->size = 0;
|
|
|
|
pkt->pos = avio_tell(s->pb);
|
|
|
|
|
|
|
|
/* we may need to return as much as all we've read back to the buffer */
|
|
|
|
ffio_ensure_seekback(s->pb, read_chunk);
|
|
|
|
|
|
|
|
while ((ret = av_append_packet(s->pb, pkt, read_chunk - remaining)) >= 0) {
|
|
|
|
/* scan the new data */
|
2015-12-03 06:39:47 +02:00
|
|
|
char *start;
|
|
|
|
|
2015-11-30 01:36:20 +02:00
|
|
|
len = ret + remaining;
|
2015-12-03 06:39:47 +02:00
|
|
|
start = pkt->data + pkt->size - len;
|
2015-11-30 01:36:20 +02:00
|
|
|
do {
|
|
|
|
if (!memcmp(start, mpjpeg->searchstr, mpjpeg->searchstr_len)) {
|
|
|
|
// got the boundary! rewind the stream
|
2016-02-14 06:16:45 +02:00
|
|
|
avio_seek(s->pb, -len, SEEK_CUR);
|
|
|
|
pkt->size -= len;
|
2015-11-30 01:36:20 +02:00
|
|
|
return pkt->size;
|
|
|
|
}
|
|
|
|
len--;
|
|
|
|
start++;
|
|
|
|
} while (len >= mpjpeg->searchstr_len);
|
|
|
|
remaining = len;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* error or EOF occurred */
|
|
|
|
if (ret == AVERROR_EOF) {
|
|
|
|
ret = pkt->size > 0 ? pkt->size : AVERROR_EOF;
|
|
|
|
} else {
|
|
|
|
av_packet_unref(pkt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
2015-05-16 17:03:28 +02:00
|
|
|
}
|
|
|
|
|
2015-11-30 01:54:14 +02:00
|
|
|
#define OFFSET(x) offsetof(MPJPEGDemuxContext, x)
|
|
|
|
|
|
|
|
#define DEC AV_OPT_FLAG_DECODING_PARAM
|
2018-06-22 16:52:58 +02:00
|
|
|
static const AVOption mpjpeg_options[] = {
|
2015-11-21 23:05:07 +02:00
|
|
|
{ "strict_mime_boundary", "require MIME boundaries match", OFFSET(strict_mime_boundary), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DEC },
|
2015-11-30 01:54:14 +02:00
|
|
|
{ NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static const AVClass mpjpeg_demuxer_class = {
|
|
|
|
.class_name = "MPJPEG demuxer",
|
|
|
|
.item_name = av_default_item_name,
|
|
|
|
.option = mpjpeg_options,
|
|
|
|
.version = LIBAVUTIL_VERSION_INT,
|
|
|
|
};
|
|
|
|
|
2015-05-16 17:03:28 +02:00
|
|
|
AVInputFormat ff_mpjpeg_demuxer = {
|
|
|
|
.name = "mpjpeg",
|
|
|
|
.long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"),
|
|
|
|
.mime_type = "multipart/x-mixed-replace",
|
|
|
|
.extensions = "mjpg",
|
2015-11-30 01:36:20 +02:00
|
|
|
.priv_data_size = sizeof(MPJPEGDemuxContext),
|
2015-05-16 17:03:28 +02:00
|
|
|
.read_probe = mpjpeg_read_probe,
|
|
|
|
.read_header = mpjpeg_read_header,
|
|
|
|
.read_packet = mpjpeg_read_packet,
|
2015-11-30 01:54:14 +02:00
|
|
|
.read_close = mpjpeg_read_close,
|
2016-02-21 20:41:56 +02:00
|
|
|
.priv_class = &mpjpeg_demuxer_class,
|
|
|
|
.flags = AVFMT_NOTIMESTAMPS,
|
2015-05-16 17:03:28 +02:00
|
|
|
};
|
2015-11-30 01:54:14 +02:00
|
|
|
|
|
|
|
|