mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 07:40:00 +08:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: (38 commits) v210enc: remove redundant check for pix_fmt wavpack: allow user to disable CRC checking v210enc: Use Bytestream2 functions cafdec: Check return value of avio_seek and avoid modifying state if it fails yop: Check return value of avio_seek and avoid modifying state if it fails tta: Check return value of avio_seek and avoid modifying state if it fails tmv: Check return value of avio_seek and avoid modifying state if it fails r3d: Check return value of avio_seek and avoid modifying state if it fails nsvdec: Check return value of avio_seek and avoid modifying state if it fails mpc8: Check return value of avio_seek and avoid modifying state if it fails jvdec: Check return value of avio_seek and avoid modifying state if it fails filmstripdec: Check return value of avio_seek and avoid modifying state if it fails ffmdec: Check return value of avio_seek and avoid modifying state if it fails dv: Check return value of avio_seek and avoid modifying state if it fails bink: Check return value of avio_seek and avoid modifying state if it fails Check AVCodec.pix_fmts in avcodec_open2() svq3: Prevent illegal reads while parsing extradata. remove ParseContext1 vc1: use ff_parse_close mpegvideo parser: move specific fields into private context ... Conflicts: libavcodec/4xm.c libavcodec/aacdec.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/mpeg4video_parser.c libavcodec/svq3.c libavcodec/v210enc.c libavformat/cafdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@ -23,11 +23,19 @@
|
||||
#include "parser.h"
|
||||
#include "mpegvideo.h"
|
||||
|
||||
struct MpvParseContext {
|
||||
ParseContext pc;
|
||||
AVRational frame_rate;
|
||||
int progressive_sequence;
|
||||
int width, height;
|
||||
};
|
||||
|
||||
|
||||
static void mpegvideo_extract_headers(AVCodecParserContext *s,
|
||||
AVCodecContext *avctx,
|
||||
const uint8_t *buf, int buf_size)
|
||||
{
|
||||
ParseContext1 *pc = s->priv_data;
|
||||
struct MpvParseContext *pc = s->priv_data;
|
||||
const uint8_t *buf_end = buf + buf_size;
|
||||
uint32_t start_code;
|
||||
int frame_rate_index, ext_type, bytes_left;
|
||||
@ -131,7 +139,7 @@ static int mpegvideo_parse(AVCodecParserContext *s,
|
||||
const uint8_t **poutbuf, int *poutbuf_size,
|
||||
const uint8_t *buf, int buf_size)
|
||||
{
|
||||
ParseContext1 *pc1 = s->priv_data;
|
||||
struct MpvParseContext *pc1 = s->priv_data;
|
||||
ParseContext *pc= &pc1->pc;
|
||||
int next;
|
||||
|
||||
@ -178,8 +186,8 @@ static int mpegvideo_split(AVCodecContext *avctx,
|
||||
|
||||
AVCodecParser ff_mpegvideo_parser = {
|
||||
.codec_ids = { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO },
|
||||
.priv_data_size = sizeof(ParseContext1),
|
||||
.priv_data_size = sizeof(struct MpvParseContext),
|
||||
.parser_parse = mpegvideo_parse,
|
||||
.parser_close = ff_parse1_close,
|
||||
.parser_close = ff_parse_close,
|
||||
.split = mpegvideo_split,
|
||||
};
|
||||
|
Reference in New Issue
Block a user