summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-29 00:20:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-29 00:20:29 +0100
commit4dcd1a3145dd93602b86a44ebc07d98ca2a30ab6 (patch)
tree694f5d2cba955bc53de20f8fb81cb54439ae5279 /libavcodec
parent4b03d960220d15cb915c2c8f15970d2f36f25cd9 (diff)
parentac47e014bbaf5163871a8beb7522015e0bc27615 (diff)
downloadffmpeg-4dcd1a3145dd93602b86a44ebc07d98ca2a30ab6.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: adtsenc: Check frame size. txd: Fix order of operations. APIchanges: fill in some blanks timer: fix misspelling of "decicycles" Eliminate pointless 0/NULL initializers in AVCodec and similar declarations. indeo3: cosmetics md5proto: Fix order of operations. dca: Replace oversized unused get_bits() with skip_bits_long(). Conflicts: doc/APIchanges libavformat/mmsh.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dca.c4
-rw-r--r--libavcodec/dxva2_h264.c1
-rw-r--r--libavcodec/dxva2_mpeg2.c1
-rw-r--r--libavcodec/dxva2_vc1.c2
-rw-r--r--libavcodec/indeo3.c2
-rw-r--r--libavcodec/mjpeg2jpeg_bsf.c1
-rw-r--r--libavcodec/s302m.c1
-rw-r--r--libavcodec/txd.c3
-rw-r--r--libavcodec/vaapi_h264.c2
-rw-r--r--libavcodec/vaapi_mpeg2.c2
-rw-r--r--libavcodec/vaapi_mpeg4.c4
-rw-r--r--libavcodec/vaapi_vc1.c4
-rw-r--r--libavcodec/vda_h264.c1
13 files changed, 5 insertions, 23 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 07a9c0a484..edafb967b4 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -519,7 +519,7 @@ static int dca_parse_frame_header(DCAContext * s)
init_get_bits(&s->gb, s->dca_buffer, s->dca_buffer_size * 8);
/* Sync code */
- get_bits(&s->gb, 32);
+ skip_bits_long(&s->gb, 32);
/* Frame header */
s->frame_type = get_bits(&s->gb, 1);
@@ -1257,7 +1257,7 @@ static int dca_subframe_footer(DCAContext * s, int base_channel)
/* presumably optional information only appears in the core? */
if (!base_channel) {
if (s->timestamp)
- get_bits(&s->gb, 32);
+ skip_bits_long(&s->gb, 32);
if (s->aux_data)
aux_data_count = get_bits(&s->gb, 6);
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index a707e63a54..af91e02188 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -443,7 +443,6 @@ AVHWAccel ff_h264_dxva2_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_H264,
.pix_fmt = PIX_FMT_DXVA2_VLD,
- .capabilities = 0,
.start_frame = start_frame,
.decode_slice = decode_slice,
.end_frame = end_frame,
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index 6ac1cda4ed..951305d00f 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -265,7 +265,6 @@ AVHWAccel ff_mpeg2_dxva2_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_MPEG2VIDEO,
.pix_fmt = PIX_FMT_DXVA2_VLD,
- .capabilities = 0,
.start_frame = start_frame,
.decode_slice = decode_slice,
.end_frame = end_frame,
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 82be918c22..0ae9685208 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -269,7 +269,6 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_WMV3,
.pix_fmt = PIX_FMT_DXVA2_VLD,
- .capabilities = 0,
.start_frame = start_frame,
.decode_slice = decode_slice,
.end_frame = end_frame,
@@ -282,7 +281,6 @@ AVHWAccel ff_vc1_dxva2_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_VC1,
.pix_fmt = PIX_FMT_DXVA2_VLD,
- .capabilities = 0,
.start_frame = start_frame,
.decode_slice = decode_slice,
.end_frame = end_frame,
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 80003a6c3e..1bb73fe790 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -759,7 +759,7 @@ static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "SkipCell procedure not implemented yet!\n");
CHECK_CELL
- if(!curr_cell.mv_ptr)
+ if (!curr_cell.mv_ptr)
return AVERROR_INVALIDDATA;
copy_cell(ctx, plane, &curr_cell);
return 0;
diff --git a/libavcodec/mjpeg2jpeg_bsf.c b/libavcodec/mjpeg2jpeg_bsf.c
index 855f24add3..c0f2db973b 100644
--- a/libavcodec/mjpeg2jpeg_bsf.c
+++ b/libavcodec/mjpeg2jpeg_bsf.c
@@ -108,6 +108,5 @@ static int mjpeg2jpeg_filter(AVBitStreamFilterContext *bsfc,
AVBitStreamFilter ff_mjpeg2jpeg_bsf = {
.name = "mjpeg2jpeg",
- .priv_data_size = 0,
.filter = mjpeg2jpeg_filter,
};
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c
index 4db18eb2d0..713d80f5d9 100644
--- a/libavcodec/s302m.c
+++ b/libavcodec/s302m.c
@@ -144,7 +144,6 @@ AVCodec ff_s302m_decoder = {
.name = "s302m",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_S302M,
- .priv_data_size = 0,
.decode = s302m_decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"),
};
diff --git a/libavcodec/txd.c b/libavcodec/txd.c
index 1b9755cc19..ca07b6ce17 100644
--- a/libavcodec/txd.c
+++ b/libavcodec/txd.c
@@ -116,7 +116,8 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
} else if (depth == 16) {
switch (d3d_format) {
case 0:
- if (!flags&1) goto unsupported;
+ if (!(flags & 1))
+ goto unsupported;
case FF_S3TC_DXT1:
if (buf_end - cur < (w/4) * (h/4) * 8)
return AVERROR_INVALIDDATA;
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 01c42f5af1..753deaf5ca 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -342,9 +342,7 @@ AVHWAccel ff_h264_vaapi_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_H264,
.pix_fmt = PIX_FMT_VAAPI_VLD,
- .capabilities = 0,
.start_frame = start_frame,
.end_frame = end_frame,
.decode_slice = decode_slice,
- .priv_data_size = 0,
};
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index dbe1d1296c..762c53c4eb 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -143,9 +143,7 @@ AVHWAccel ff_mpeg2_vaapi_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_MPEG2VIDEO,
.pix_fmt = PIX_FMT_VAAPI_VLD,
- .capabilities = 0,
.start_frame = vaapi_mpeg2_start_frame,
.end_frame = vaapi_mpeg2_end_frame,
.decode_slice = vaapi_mpeg2_decode_slice,
- .priv_data_size = 0,
};
diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c
index f6e26d4130..b3dcc14457 100644
--- a/libavcodec/vaapi_mpeg4.c
+++ b/libavcodec/vaapi_mpeg4.c
@@ -155,11 +155,9 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_MPEG4,
.pix_fmt = PIX_FMT_VAAPI_VLD,
- .capabilities = 0,
.start_frame = vaapi_mpeg4_start_frame,
.end_frame = vaapi_mpeg4_end_frame,
.decode_slice = vaapi_mpeg4_decode_slice,
- .priv_data_size = 0,
};
#endif
@@ -169,10 +167,8 @@ AVHWAccel ff_h263_vaapi_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_H263,
.pix_fmt = PIX_FMT_VAAPI_VLD,
- .capabilities = 0,
.start_frame = vaapi_mpeg4_start_frame,
.end_frame = vaapi_mpeg4_end_frame,
.decode_slice = vaapi_mpeg4_decode_slice,
- .priv_data_size = 0,
};
#endif
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c
index 09bef4a5f9..ad5a89fe6f 100644
--- a/libavcodec/vaapi_vc1.c
+++ b/libavcodec/vaapi_vc1.c
@@ -346,11 +346,9 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_WMV3,
.pix_fmt = PIX_FMT_VAAPI_VLD,
- .capabilities = 0,
.start_frame = vaapi_vc1_start_frame,
.end_frame = vaapi_vc1_end_frame,
.decode_slice = vaapi_vc1_decode_slice,
- .priv_data_size = 0,
};
#endif
@@ -359,9 +357,7 @@ AVHWAccel ff_vc1_vaapi_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_VC1,
.pix_fmt = PIX_FMT_VAAPI_VLD,
- .capabilities = 0,
.start_frame = vaapi_vc1_start_frame,
.end_frame = vaapi_vc1_end_frame,
.decode_slice = vaapi_vc1_decode_slice,
- .priv_data_size = 0,
};
diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
index 6ea5e0fdd7..254268f558 100644
--- a/libavcodec/vda_h264.c
+++ b/libavcodec/vda_h264.c
@@ -86,7 +86,6 @@ AVHWAccel ff_h264_vda_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_H264,
.pix_fmt = PIX_FMT_VDA_VLD,
- .capabilities = 0,
.start_frame = start_frame,
.decode_slice = decode_slice,
.end_frame = end_frame,