From 999e7ebd235058d4b006b8445def2186b5757262 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Sun, 27 Nov 2011 15:48:20 -0800 Subject: dca: Replace oversized unused get_bits() with skip_bits_long(). --- libavcodec/dca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/dca.c b/libavcodec/dca.c index 9d24b595c2..21a245585d 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -520,7 +520,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); @@ -1258,7 +1258,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); -- cgit v1.2.3 From 1469f943adb06b85ac7e22fd3e8121c2308b0830 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 28 Nov 2011 09:33:36 +0100 Subject: indeo3: cosmetics Signed-off-by: Diego Biurrun --- libavcodec/indeo3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec') diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index e266aeecec..4f3cb36606 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -756,7 +756,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; -- cgit v1.2.3 From c88ebdb42c0a4e4c3d78c705752f06fe78af27f6 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sat, 26 Nov 2011 18:35:26 +0100 Subject: Eliminate pointless 0/NULL initializers in AVCodec and similar declarations. --- libavcodec/dxva2_h264.c | 1 - libavcodec/dxva2_mpeg2.c | 1 - libavcodec/dxva2_vc1.c | 2 -- libavcodec/mjpeg2jpeg_bsf.c | 1 - libavcodec/s302m.c | 1 - libavcodec/vaapi_h264.c | 2 -- libavcodec/vaapi_mpeg2.c | 2 -- libavcodec/vaapi_mpeg4.c | 4 ---- libavcodec/vaapi_vc1.c | 4 ---- libavcodec/vda_h264.c | 1 - libavformat/a64.c | 1 - libavformat/amr.c | 1 - libavformat/mmsh.c | 2 -- libavformat/mpeg.c | 1 - libavformat/rsodec.c | 3 --- libavformat/rsoenc.c | 1 - libavformat/rtpdec_mpeg4.c | 3 --- libavformat/tls.c | 1 - 18 files changed, 32 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index ea51958c62..9608ecb8e6 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 092123bff5..2e77cd1bd8 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 f8b74a2b35..22ad4598ae 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/mjpeg2jpeg_bsf.c b/libavcodec/mjpeg2jpeg_bsf.c index 335a73bf54..a91152d733 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 faaa8ed2f5..f6f096d89f 100644 --- a/libavcodec/s302m.c +++ b/libavcodec/s302m.c @@ -134,7 +134,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/vaapi_h264.c b/libavcodec/vaapi_h264.c index 51ebaaf5a0..820568aa25 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -341,9 +341,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 b608246cb9..6b08ed2efc 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 1a756cbaf4..915632844e 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 452b97d25a..d519987ff0 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 c9022673fc..b50a4c99a4 100644 --- a/libavcodec/vda_h264.c +++ b/libavcodec/vda_h264.c @@ -102,7 +102,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, diff --git a/libavformat/a64.c b/libavformat/a64.c index 4b4981e9a8..3cea50b6c5 100644 --- a/libavformat/a64.c +++ b/libavformat/a64.c @@ -166,7 +166,6 @@ static int a64_write_trailer(struct AVFormatContext *s) AVOutputFormat ff_a64_muxer = { .name = "a64", .long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"), - .mime_type = NULL, .extensions = "a64, A64", .priv_data_size = sizeof (A64Context), .video_codec = CODEC_ID_A64_MULTI, diff --git a/libavformat/amr.c b/libavformat/amr.c index b26afa71b7..0f62c7dfa5 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -176,7 +176,6 @@ static int amr_read_packet(AVFormatContext *s, AVInputFormat ff_amr_demuxer = { .name = "amr", .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR file format"), - .priv_data_size = 0, /*priv_data_size*/ .read_probe = amr_probe, .read_header = amr_read_header, .read_packet = amr_read_packet, diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c index 50e160f7ba..8a6de322cf 100644 --- a/libavformat/mmsh.c +++ b/libavformat/mmsh.c @@ -366,7 +366,5 @@ URLProtocol ff_mmsh_protocol = { .name = "mmsh", .url_open = mmsh_open, .url_read = mmsh_read, - .url_write = NULL, - .url_seek = NULL, .url_close = mmsh_close, }; diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 982903829f..f740a25f89 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -614,7 +614,6 @@ AVInputFormat ff_mpegps_demuxer = { .read_probe = mpegps_probe, .read_header = mpegps_read_header, .read_packet = mpegps_read_packet, - .read_seek = NULL, //mpegps_read_seek, .read_timestamp = mpegps_read_dts, .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, }; diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c index 0f7588bd8a..cdce7e6743 100644 --- a/libavformat/rsodec.c +++ b/libavformat/rsodec.c @@ -92,11 +92,8 @@ AVInputFormat ff_rso_demuxer = { .name = "rso", .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO format"), .extensions = "rso", - .priv_data_size = 0, - .read_probe = NULL, /* no magic value in this format */ .read_header = rso_read_header, .read_packet = rso_read_packet, - .read_close = NULL, .read_seek = pcm_read_seek, .codec_tag = (const AVCodecTag* const []){ff_codec_rso_tags, 0}, }; diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c index 338ecf0173..f338d0df4e 100644 --- a/libavformat/rsoenc.c +++ b/libavformat/rsoenc.c @@ -104,7 +104,6 @@ AVOutputFormat ff_rso_muxer = { .name = "rso", .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO format"), .extensions = "rso", - .priv_data_size = 0, .audio_codec = CODEC_ID_PCM_U8, .video_codec = CODEC_ID_NONE, .write_header = rso_write_header, diff --git a/libavformat/rtpdec_mpeg4.c b/libavformat/rtpdec_mpeg4.c index 65071bd4d3..b143c1aee8 100644 --- a/libavformat/rtpdec_mpeg4.c +++ b/libavformat/rtpdec_mpeg4.c @@ -234,9 +234,6 @@ RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler = { .codec_type = AVMEDIA_TYPE_VIDEO, .codec_id = CODEC_ID_MPEG4, .parse_sdp_a_line = parse_sdp_line, - .alloc = NULL, - .free = NULL, - .parse_packet = NULL }; RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler = { diff --git a/libavformat/tls.c b/libavformat/tls.c index 339b799322..26f5ee5106 100644 --- a/libavformat/tls.c +++ b/libavformat/tls.c @@ -246,7 +246,6 @@ URLProtocol ff_tls_protocol = { .url_open = tls_open, .url_read = tls_read, .url_write = tls_write, - .url_seek = NULL, .url_close = tls_close, .priv_data_size = sizeof(TLSContext), }; -- cgit v1.2.3 From a27805189ba505834c74ec72edc5fddf18f5cfa9 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Sun, 27 Nov 2011 16:17:13 -0800 Subject: txd: Fix order of operations. --- libavcodec/txd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavcodec') diff --git a/libavcodec/txd.c b/libavcodec/txd.c index 74ffff66b3..734062aca6 100644 --- a/libavcodec/txd.c +++ b/libavcodec/txd.c @@ -108,7 +108,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: ff_decode_dxt1(cur, ptr, w, h, stride); break; -- cgit v1.2.3