Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3b199d29
Commit
3b199d29
authored
Feb 13, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc decoders: properly initialize AVFrame.
parent
759001c5
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
34 additions
and
13 deletions
+34
-13
avs.c
libavcodec/avs.c
+2
-0
bethsoftvideo.c
libavcodec/bethsoftvideo.c
+1
-0
c93.c
libavcodec/c93.c
+3
-0
cinepak.c
libavcodec/cinepak.c
+1
-1
dsicinav.c
libavcodec/dsicinav.c
+1
-1
dv.c
libavcodec/dv.c
+1
-0
flashsv.c
libavcodec/flashsv.c
+1
-1
flicvideo.c
libavcodec/flicvideo.c
+1
-1
fraps.c
libavcodec/fraps.c
+2
-0
iff.c
libavcodec/iff.c
+2
-0
indeo2.c
libavcodec/indeo2.c
+2
-0
mmvideo.c
libavcodec/mmvideo.c
+2
-0
motionpixels.c
libavcodec/motionpixels.c
+1
-0
msrle.c
libavcodec/msrle.c
+1
-1
msvideo1.c
libavcodec/msvideo1.c
+1
-1
qpeg.c
libavcodec/qpeg.c
+2
-0
qtrle.c
libavcodec/qtrle.c
+1
-1
rpza.c
libavcodec/rpza.c
+1
-1
smacker.c
libavcodec/smacker.c
+1
-1
smc.c
libavcodec/smc.c
+1
-1
tiertexseqv.c
libavcodec/tiertexseqv.c
+1
-1
truemotion1.c
libavcodec/truemotion1.c
+1
-1
truemotion2.c
libavcodec/truemotion2.c
+1
-1
ulti.c
libavcodec/ulti.c
+1
-0
vmnc.c
libavcodec/vmnc.c
+2
-0
No files found.
libavcodec/avs.c
View file @
3b199d29
...
...
@@ -158,8 +158,10 @@ avs_decode_frame(AVCodecContext * avctx,
static
av_cold
int
avs_decode_init
(
AVCodecContext
*
avctx
)
{
AvsContext
*
s
=
avctx
->
priv_data
;
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
avcodec_set_dimensions
(
avctx
,
318
,
198
);
avcodec_get_frame_defaults
(
&
s
->
picture
);
return
0
;
}
...
...
libavcodec/bethsoftvideo.c
View file @
3b199d29
...
...
@@ -42,6 +42,7 @@ static av_cold int bethsoftvid_decode_init(AVCodecContext *avctx)
{
BethsoftvidContext
*
vid
=
avctx
->
priv_data
;
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
avcodec_get_frame_defaults
(
&
vid
->
frame
);
return
0
;
}
...
...
libavcodec/c93.c
View file @
3b199d29
...
...
@@ -48,7 +48,10 @@ typedef enum {
static
av_cold
int
decode_init
(
AVCodecContext
*
avctx
)
{
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
;
}
...
...
libavcodec/cinepak.c
View file @
3b199d29
...
...
@@ -414,7 +414,7 @@ static av_cold int cinepak_decode_init(AVCodecContext *avctx)
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
}
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
return
0
;
}
...
...
libavcodec/dsicinav.c
View file @
3b199d29
...
...
@@ -96,7 +96,7 @@ static av_cold int cinvideo_decode_init(AVCodecContext *avctx)
cin
->
avctx
=
avctx
;
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
cin
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
cin
->
frame
)
;
cin
->
bitmap_size
=
avctx
->
width
*
avctx
->
height
;
for
(
i
=
0
;
i
<
3
;
++
i
)
{
...
...
libavcodec/dv.c
View file @
3b199d29
...
...
@@ -313,6 +313,7 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx)
s
->
idct_put
[
1
]
=
ff_simple_idct248_put
;
// FIXME: need to add it to DSP
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
;
...
...
libavcodec/flashsv.c
View file @
3b199d29
...
...
@@ -115,7 +115,7 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx)
return
1
;
}
avctx
->
pix_fmt
=
AV_PIX_FMT_BGR24
;
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
return
0
;
}
...
...
libavcodec/flicvideo.c
View file @
3b199d29
...
...
@@ -123,7 +123,7 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
return
AVERROR_INVALIDDATA
;
}
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
s
->
new_palette
=
0
;
return
0
;
...
...
libavcodec/fraps.c
View file @
3b199d29
...
...
@@ -66,6 +66,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
s
->
avctx
=
avctx
;
s
->
tmpbuf
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
);
ff_dsputil_init
(
&
s
->
dsp
,
avctx
);
return
0
;
...
...
libavcodec/iff.c
View file @
3b199d29
...
...
@@ -168,6 +168,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
if
(
!
s
->
planebuf
)
return
AVERROR
(
ENOMEM
);
avcodec_get_frame_defaults
(
&
s
->
frame
);
return
0
;
}
...
...
libavcodec/indeo2.c
View file @
3b199d29
...
...
@@ -219,6 +219,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
...
...
libavcodec/mmvideo.c
View file @
3b199d29
...
...
@@ -61,6 +61,8 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
avcodec_get_frame_defaults
(
&
s
->
frame
);
return
0
;
}
...
...
libavcodec/motionpixels.c
View file @
3b199d29
...
...
@@ -64,6 +64,7 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
mp
->
vpt
=
av_mallocz
(
avctx
->
height
*
sizeof
(
YuvPixel
));
mp
->
hpt
=
av_mallocz
(
h4
*
w4
/
16
*
sizeof
(
YuvPixel
));
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB555
;
avcodec_get_frame_defaults
(
&
mp
->
frame
);
return
0
;
}
...
...
libavcodec/msrle.c
View file @
3b199d29
...
...
@@ -66,7 +66,7 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx)
return
AVERROR_INVALIDDATA
;
}
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
return
0
;
}
...
...
libavcodec/msvideo1.c
View file @
3b199d29
...
...
@@ -72,7 +72,7 @@ static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB555
;
}
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
return
0
;
}
...
...
libavcodec/qpeg.c
View file @
3b199d29
...
...
@@ -295,6 +295,8 @@ static av_cold int decode_init(AVCodecContext *avctx){
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
a
->
refdata
=
av_malloc
(
avctx
->
width
*
avctx
->
height
);
avcodec_get_frame_defaults
(
&
a
->
pic
);
return
0
;
}
...
...
libavcodec/qtrle.c
View file @
3b199d29
...
...
@@ -385,7 +385,7 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx)
return
AVERROR_INVALIDDATA
;
}
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
return
0
;
}
...
...
libavcodec/rpza.c
View file @
3b199d29
...
...
@@ -239,7 +239,7 @@ static av_cold int rpza_decode_init(AVCodecContext *avctx)
s
->
avctx
=
avctx
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB555
;
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
return
0
;
}
...
...
libavcodec/smacker.c
View file @
3b199d29
...
...
@@ -518,7 +518,7 @@ 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 */
if
(
avctx
->
extradata_size
<
16
){
...
...
libavcodec/smc.c
View file @
3b199d29
...
...
@@ -417,7 +417,7 @@ static av_cold int smc_decode_init(AVCodecContext *avctx)
s
->
avctx
=
avctx
;
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
return
0
;
}
...
...
libavcodec/tiertexseqv.c
View file @
3b199d29
...
...
@@ -217,7 +217,7 @@ static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
seq
->
avctx
=
avctx
;
avctx
->
pix_fmt
=
AV_PIX_FMT_PAL8
;
seq
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
seq
->
frame
)
;
return
0
;
}
...
...
libavcodec/truemotion1.c
View file @
3b199d29
...
...
@@ -468,7 +468,7 @@ static av_cold int truemotion1_decode_init(AVCodecContext *avctx)
// else
// avctx->pix_fmt = AV_PIX_FMT_RGB555;
s
->
frame
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
s
->
frame
)
;
/* there is a vertical predictor for each pixel in a line; each vertical
* predictor is 0 to start with */
...
...
libavcodec/truemotion2.c
View file @
3b199d29
...
...
@@ -900,7 +900,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
l
->
avctx
=
avctx
;
l
->
pic
.
data
[
0
]
=
NULL
;
avcodec_get_frame_defaults
(
&
l
->
pic
)
;
avctx
->
pix_fmt
=
AV_PIX_FMT_BGR24
;
ff_dsputil_init
(
&
l
->
dsp
,
avctx
);
...
...
libavcodec/ulti.c
View file @
3b199d29
...
...
@@ -53,6 +53,7 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx)
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV410P
;
avctx
->
coded_frame
=
&
s
->
frame
;
s
->
ulti_codebook
=
ulti_codebook
;
avcodec_get_frame_defaults
(
&
s
->
frame
);
return
0
;
}
...
...
libavcodec/vmnc.c
View file @
3b199d29
...
...
@@ -488,6 +488,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
return
AVERROR_INVALIDDATA
;
}
avcodec_get_frame_defaults
(
&
c
->
pic
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment