summaryrefslogtreecommitdiffstats
path: root/libavcodec
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 /libavcodec
parent01a0283c92b124f185ce4e814a1c5b600f1135e0 (diff)
parent3b199d29cd597a3518136d78860e172060b9e83d (diff)
downloadffmpeg-streaming-b5e5ed8ea707fefcab15dbfa3fa0dc2f36e5275a.zip
ffmpeg-streaming-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>
Diffstat (limited to 'libavcodec')
-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 d5b2167..a6e020a 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 d587d3d..e7fbcc8 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 0812dbb..39a87a9 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 b5eb435..a44e779 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 caadbea..27584cb 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 b8925f7..0ce65b1 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 3b780ee..d242b4b 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 3b82b82..ba38daa 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 e45ee72..afaa7ae 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 b4f5433..193e8c6 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 4a5437f..60b2029 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 c73e40e..cce5b0d 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 1b4898b..3530033 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 e0b0f6b..52dce53 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 5b93dc2..1c7e2e0 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 8af92f5..a98897f 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 8c28a81..6918a17 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 a6d8216..84337c6 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 a53adac..769b40a 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;
}
OpenPOWER on IntegriCloud