aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-12 03:51:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-12 03:54:40 +0100
commitb5e5ed8ea707fefcab15dbfa3fa0dc2f36e5275a (patch)
tree8e2c8a028781da99fa256c200e635b16d496e62a
parent01a0283c92b124f185ce4e814a1c5b600f1135e0 (diff)
parent3b199d29cd597a3518136d78860e172060b9e83d (diff)
downloadffmpeg-b5e5ed8ea707fefcab15dbfa3fa0dc2f36e5275a.tar.gz
Merge commit '3b199d29cd597a3518136d78860e172060b9e83d'
* commit '3b199d29cd597a3518136d78860e172060b9e83d': lavc decoders: properly initialize AVFrame. Conflicts: libavcodec/avs.c libavcodec/c93.c libavcodec/cinepak.c libavcodec/flashsv.c libavcodec/flicvideo.c libavcodec/iff.c libavcodec/mmvideo.c libavcodec/msrle.c libavcodec/msvideo1.c libavcodec/qtrle.c libavcodec/rpza.c libavcodec/smacker.c libavcodec/smc.c libavcodec/tiertexseqv.c libavcodec/truemotion1.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/avs.c4
-rw-r--r--libavcodec/c93.c7
-rw-r--r--libavcodec/dv.c1
-rw-r--r--libavcodec/flashsv.c1
-rw-r--r--libavcodec/flicvideo.c1
-rw-r--r--libavcodec/indeo2.c2
-rw-r--r--libavcodec/mmvideo.c1
-rw-r--r--libavcodec/msrle.c1
-rw-r--r--libavcodec/msvideo1.c1
-rw-r--r--libavcodec/qpeg.c2
-rw-r--r--libavcodec/qtrle.c1
-rw-r--r--libavcodec/rpza.c1
-rw-r--r--libavcodec/smacker.c1
-rw-r--r--libavcodec/smc.c1
-rw-r--r--libavcodec/tiertexseqv.c1
-rw-r--r--libavcodec/truemotion1.c1
-rw-r--r--libavcodec/truemotion2.c3
-rw-r--r--libavcodec/ulti.c1
-rw-r--r--libavcodec/vmnc.c2
19 files changed, 15 insertions, 18 deletions
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index d5b21670c3..a6e020a6d2 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -160,10 +160,10 @@ avs_decode_frame(AVCodecContext * avctx,
static av_cold int avs_decode_init(AVCodecContext * avctx)
{
- AvsContext *const avs = avctx->priv_data;
+ AvsContext *s = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
- avcodec_get_frame_defaults(&avs->picture);
avcodec_set_dimensions(avctx, 318, 198);
+ avcodec_get_frame_defaults(&s->picture);
return 0;
}
diff --git a/libavcodec/c93.c b/libavcodec/c93.c
index d587d3d561..e7fbcc85c9 100644
--- a/libavcodec/c93.c
+++ b/libavcodec/c93.c
@@ -48,11 +48,10 @@ typedef enum {
static av_cold int decode_init(AVCodecContext *avctx)
{
- C93DecoderContext * const c93 = avctx->priv_data;
-
- avcodec_get_frame_defaults(&c93->pictures[0]);
- avcodec_get_frame_defaults(&c93->pictures[1]);
+ C93DecoderContext *s = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ avcodec_get_frame_defaults(&s->pictures[0]);
+ avcodec_get_frame_defaults(&s->pictures[1]);
return 0;
}
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 0812dbbacf..39a87a93c2 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -320,6 +320,7 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx)
}else
memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64);
+ avcodec_get_frame_defaults(&s->picture);
avctx->coded_frame = &s->picture;
s->avctx = avctx;
avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index b5eb4355ab..a44e779d8d 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -116,7 +116,6 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx)
}
avctx->pix_fmt = AV_PIX_FMT_BGR24;
avcodec_get_frame_defaults(&s->frame);
- s->frame.data[0] = NULL;
return 0;
}
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index caadbea190..27584cb23b 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -142,7 +142,6 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
}
avcodec_get_frame_defaults(&s->frame);
- s->frame.data[0] = NULL;
s->new_palette = 0;
return 0;
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c
index b8925f70f7..0ce65b1ffa 100644
--- a/libavcodec/indeo2.c
+++ b/libavcodec/indeo2.c
@@ -220,6 +220,8 @@ static av_cold int ir2_decode_init(AVCodecContext *avctx)
avctx->pix_fmt= AV_PIX_FMT_YUV410P;
+ avcodec_get_frame_defaults(&ic->picture);
+
ir2_vlc.table = vlc_tables;
ir2_vlc.table_allocated = 1 << CODE_VLC_BITS;
#ifdef BITSTREAM_READER_LE
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 3b780eec50..d242b4bb12 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -62,6 +62,7 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_PAL8;
avcodec_get_frame_defaults(&s->frame);
+
return 0;
}
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index 3b82b82ff4..ba38daad2f 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -71,7 +71,6 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx)
}
avcodec_get_frame_defaults(&s->frame);
- s->frame.data[0] = NULL;
if (avctx->extradata_size >= 4)
for (i = 0; i < FFMIN(avctx->extradata_size, AVPALETTE_SIZE)/4; i++)
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index e45ee72f41..afaa7ae89f 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -73,7 +73,6 @@ static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
}
avcodec_get_frame_defaults(&s->frame);
- s->frame.data[0] = NULL;
return 0;
}
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c
index b4f5433c9b..193e8c6a42 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -324,6 +324,8 @@ static av_cold int decode_init(AVCodecContext *avctx){
decode_flush(avctx);
+ avcodec_get_frame_defaults(&a->pic);
+
return 0;
}
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index 4a5437ffe0..60b2029413 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -397,7 +397,6 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx)
}
avcodec_get_frame_defaults(&s->frame);
- s->frame.data[0] = NULL;
return 0;
}
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index c73e40e537..cce5b0d07d 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -240,7 +240,6 @@ static av_cold int rpza_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_RGB555;
avcodec_get_frame_defaults(&s->frame);
- s->frame.data[0] = NULL;
return 0;
}
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 1b4898beb8..3530033f44 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -534,7 +534,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
-
avcodec_get_frame_defaults(&c->pic);
/* decode huffman trees from extradata */
diff --git a/libavcodec/smc.c b/libavcodec/smc.c
index e0b0f6be56..52dce53679 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -418,7 +418,6 @@ static av_cold int smc_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_PAL8;
avcodec_get_frame_defaults(&s->frame);
- s->frame.data[0] = NULL;
return 0;
}
diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c
index 5b93dc219d..1c7e2e0acf 100644
--- a/libavcodec/tiertexseqv.c
+++ b/libavcodec/tiertexseqv.c
@@ -218,7 +218,6 @@ static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_PAL8;
avcodec_get_frame_defaults(&seq->frame);
- seq->frame.data[0] = NULL;
return 0;
}
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index 8af92f501a..a98897fb7f 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -469,7 +469,6 @@ static av_cold int truemotion1_decode_init(AVCodecContext *avctx)
// avctx->pix_fmt = AV_PIX_FMT_RGB555;
avcodec_get_frame_defaults(&s->frame);
- s->frame.data[0] = NULL;
/* there is a vertical predictor for each pixel in a line; each vertical
* predictor is 0 to start with */
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 8c28a816f6..6918a17e16 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -918,9 +918,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
l->avctx = avctx;
- l->pic.data[0] = NULL;
- avctx->pix_fmt = AV_PIX_FMT_BGR24;
avcodec_get_frame_defaults(&l->pic);
+ avctx->pix_fmt = AV_PIX_FMT_BGR24;
ff_dsputil_init(&l->dsp, avctx);
diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c
index a6d8216dad..84337c645f 100644
--- a/libavcodec/ulti.c
+++ b/libavcodec/ulti.c
@@ -54,6 +54,7 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx)
avctx->coded_frame = &s->frame;
avctx->coded_frame = (AVFrame*) &s->frame;
s->ulti_codebook = ulti_codebook;
+ avcodec_get_frame_defaults(&s->frame);
return 0;
}
diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index a53adac6dc..769b40a4b6 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -497,6 +497,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
+ avcodec_get_frame_defaults(&c->pic);
+
return 0;
}