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:
Michael Niedermayer
2012-02-11 01:22:22 +01:00
30 changed files with 1177 additions and 925 deletions

View File

@@ -27,6 +27,11 @@
#include "mpeg4video.h"
#include "mpeg4video_parser.h"
struct Mp4vParseContext {
ParseContext pc;
struct MpegEncContext enc;
int first_picture;
};
int ff_mpeg4_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size){
int vop_found, i;
@@ -70,8 +75,8 @@ static int av_mpeg4_decode_header(AVCodecParserContext *s1,
AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
ParseContext1 *pc = s1->priv_data;
MpegEncContext *s = pc->enc;
struct Mp4vParseContext *pc = s1->priv_data;
MpegEncContext *s = &pc->enc;
GetBitContext gb1, *gb = &gb1;
int ret;
@@ -95,14 +100,11 @@ static int av_mpeg4_decode_header(AVCodecParserContext *s1,
static av_cold int mpeg4video_parse_init(AVCodecParserContext *s)
{
ParseContext1 *pc = s->priv_data;
struct Mp4vParseContext *pc = s->priv_data;
pc->enc = av_mallocz(sizeof(MpegEncContext));
if (!pc->enc)
return -1;
pc->first_picture = 1;
pc->enc->quant_precision=5;
pc->enc->slice_context_count = 1;
pc->enc.quant_precision=5;
pc->enc.slice_context_count = 1;
return 0;
}
@@ -135,9 +137,9 @@ static int mpeg4video_parse(AVCodecParserContext *s,
AVCodecParser ff_mpeg4video_parser = {
.codec_ids = { CODEC_ID_MPEG4 },
.priv_data_size = sizeof(ParseContext1),
.priv_data_size = sizeof(struct Mp4vParseContext),
.parser_init = mpeg4video_parse_init,
.parser_parse = mpeg4video_parse,
.parser_close = ff_parse1_close,
.parser_close = ff_parse_close,
.split = ff_mpeg4video_split,
};