From e7f0bc8c0f1c4a8731eb1c33cb013296a0555538 Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Sun, 5 Feb 2012 00:14:15 +0200 Subject: [PATCH 01/18] drawtext: add missing braces around an if() block. Prevents uninitialized read. Signed-off-by: Anton Khirnov --- libavfilter/vf_drawtext.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index dcde542118b92..c5a6ffe60ff8e 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -492,9 +492,11 @@ static int dtext_prepare_text(AVFilterContext *ctx) /* get glyph */ dummy.code = code; glyph = av_tree_find(dtext->glyphs, &dummy, glyph_cmp, NULL); - if (!glyph) + if (!glyph) { ret = load_glyph(ctx, &glyph, code); - if (ret) return ret; + if (ret) + return ret; + } y_min = FFMIN(glyph->bbox.yMin, y_min); y_max = FFMAX(glyph->bbox.yMax, y_max); From 2b43dfce3651bc517c66365a30f30b708d6b79af Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Sun, 5 Feb 2012 00:14:16 +0200 Subject: [PATCH 02/18] drawtext: fix text_{w, h} expression vars Before, {text_,}{w,h} vars hadn't got initialized Signed-off-by: Anton Khirnov --- libavfilter/vf_drawtext.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index c5a6ffe60ff8e..f6ce1243e60bf 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -550,7 +550,9 @@ static int dtext_prepare_text(AVFilterContext *ctx) y = FFMIN(y + text_height, height - 1); dtext->w = str_w; + dtext->var_values[VAR_TEXT_W] = dtext->var_values[VAR_TW] = dtext->w; dtext->h = y; + dtext->var_values[VAR_TEXT_H] = dtext->var_values[VAR_TH] = dtext->h; return 0; } From e496c45d9ba58586b3826c0bd9e4be155b8fd1df Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Sun, 5 Feb 2012 14:41:01 +0200 Subject: [PATCH 03/18] drawtext: add 'fix_bounds' option on coords fixing Before, drawtext filter deliberately altered given text coordinates if text didn't fully fit on the picture. This breaks the use case of scrolling large text, e.g. movie closing credits. Add 'fix_bounds', to make it usable in such cases (by setting its value to 0). Default behavior is not changed, and non-fitting text coords are fixed. Signed-off-by: Anton Khirnov --- doc/filters.texi | 3 +++ libavfilter/vf_drawtext.c | 17 +++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 4e7ede23a48bf..16059fd41d650 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -598,6 +598,9 @@ libfreetype flags. @item tabsize The size in number of spaces to use for rendering the tab. Default value is 4. + +@item fix_bounds +If true, check and fix text coords to avoid clipping. @end table For example the command: diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index f6ce1243e60bf..5b794dc5453e5 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -122,6 +122,7 @@ typedef struct { short int draw_box; ///< draw box around text - true or false int use_kerning; ///< font kerning is used - true/false int tabsize; ///< tab size + int fix_bounds; ///< do we let it go out of frame bounds - t/f FT_Library library; ///< freetype font library handle FT_Face face; ///< freetype font face handle @@ -157,6 +158,8 @@ static const AVOption drawtext_options[]= { {"shadowy", "set y", OFFSET(shadowy), AV_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX }, {"tabsize", "set tab size", OFFSET(tabsize), AV_OPT_TYPE_INT, {.dbl=4}, 0, INT_MAX }, {"draw", "if false do not draw", OFFSET(d_expr), AV_OPT_TYPE_STRING, {.str="1"}, CHAR_MIN, CHAR_MAX }, +{"fix_bounds", "if true, check and fix text coords to avoid clipping", + OFFSET(fix_bounds), AV_OPT_TYPE_INT, {.dbl=1}, 0, 1 }, /* FT_LOAD_* flags */ {"ft_load_flags", "set font loading flags for libfreetype", OFFSET(ft_load_flags), AV_OPT_TYPE_FLAGS, {.dbl=FT_LOAD_DEFAULT|FT_LOAD_RENDER}, 0, INT_MAX, 0, "ft_load_flags" }, @@ -828,12 +831,14 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) normalize_double(&dtext->x, dtext->var_values[VAR_X]); normalize_double(&dtext->y, dtext->var_values[VAR_Y]); - if (dtext->x < 0) dtext->x = 0; - if (dtext->y < 0) dtext->y = 0; - if ((unsigned)dtext->x + (unsigned)dtext->w > inlink->w) - dtext->x = inlink->w - dtext->w; - if ((unsigned)dtext->y + (unsigned)dtext->h > inlink->h) - dtext->y = inlink->h - dtext->h; + if (dtext->fix_bounds) { + if (dtext->x < 0) dtext->x = 0; + if (dtext->y < 0) dtext->y = 0; + if ((unsigned)dtext->x + (unsigned)dtext->w > inlink->w) + dtext->x = inlink->w - dtext->w; + if ((unsigned)dtext->y + (unsigned)dtext->h > inlink->h) + dtext->y = inlink->h - dtext->h; + } dtext->x &= ~((1 << dtext->hsub) - 1); dtext->y &= ~((1 << dtext->vsub) - 1); From d73466f841b1732e4e817bf51f2153c4bab00428 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:34 +0000 Subject: [PATCH 04/18] v210enc: check for coded_frame allocation failure Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 58613520a574f..069f915158c80 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -41,6 +41,8 @@ static av_cold int encode_init(AVCodecContext *avctx) avctx->bits_per_raw_sample); avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); avctx->coded_frame->key_frame = 1; avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; From 66fa2a1fb371a393b6e03bf85efb08d4df9a7f75 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:35 +0000 Subject: [PATCH 05/18] v210enc: do not set coded_frame->key_frame It is already set in avcodec_alloc_frame(). Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210enc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 069f915158c80..6266bb96b12bc 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -44,7 +44,6 @@ static av_cold int encode_init(AVCodecContext *avctx) if (!avctx->coded_frame) return AVERROR(ENOMEM); - avctx->coded_frame->key_frame = 1; avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; return 0; From b5f50da593b2207dbcc9bde9c3662a5fb397a546 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:36 +0000 Subject: [PATCH 06/18] v210enc: return proper AVERROR codes instead of -1 Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 6266bb96b12bc..c31254ebc75e5 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -28,7 +28,7 @@ static av_cold int encode_init(AVCodecContext *avctx) { if (avctx->width & 1) { av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n"); - return -1; + return AVERROR(EINVAL); } if (avctx->pix_fmt != PIX_FMT_YUV422P10) { @@ -64,7 +64,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, if (buf_size < aligned_width * avctx->height * 8 / 3) { av_log(avctx, AV_LOG_ERROR, "output buffer too small\n"); - return -1; + return AVERROR(ENOMEM); } #define CLIP(v) av_clip(v, 4, 1019) From 7ad1b612c8a2a1b1b47f6c3c580ced4bca17e1c7 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:37 +0000 Subject: [PATCH 07/18] v210enc: use FFALIGN() Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index c31254ebc75e5..00a89025d22d8 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -53,7 +53,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data) { const AVFrame *pic = data; - int aligned_width = ((avctx->width + 47) / 48) * 48; + int aligned_width = FFALIGN(avctx->width, 48); int stride = aligned_width * 8 / 3; int h, w; const uint16_t *y = (const uint16_t*)pic->data[0]; From 986c1c483befa717ee20710e21f5a5c014666c6e Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:38 +0000 Subject: [PATCH 08/18] v210enc: use stride as it is already calculated Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 00a89025d22d8..17b3a9a6e2c06 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -62,7 +62,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, uint8_t *p = buf; uint8_t *pdst = buf; - if (buf_size < aligned_width * avctx->height * 8 / 3) { + if (buf_size < avctx->height * stride) { av_log(avctx, AV_LOG_ERROR, "output buffer too small\n"); return AVERROR(ENOMEM); } From 3cc0353f8d4eaa4862450bbe517e7fcf8be4f2bd Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:39 +0000 Subject: [PATCH 09/18] v210dec: check for coded_frame allocation failure Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 37b4a3c423017..d464572f78133 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -34,6 +34,8 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->bits_per_raw_sample = 10; avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); return 0; } From 9814974d2e4c7f3f7fda6cd45ab330b20bc88452 Mon Sep 17 00:00:00 2001 From: Kieran Kunhya Date: Sun, 5 Feb 2012 04:28:58 -0600 Subject: [PATCH 10/18] avcodec: Clarify AVFrame member documentation. Signed-off-by: Diego Biurrun --- libavcodec/avcodec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index fcbb68ad60f20..05e8b9c05bf64 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -852,7 +852,7 @@ typedef struct AVFrame { * For audio, only linesize[0] may be set. For planar audio, each channel * plane must be the same size. * - * - encoding: Set by user (video only) + * - encoding: Set by user * - decoding: set by AVCodecContext.get_buffer() */ int linesize[AV_NUM_DATA_POINTERS]; @@ -1102,7 +1102,7 @@ typedef struct AVFrame { /** * number of audio samples (per channel) described by this frame - * - encoding: unused + * - encoding: Set by user * - decoding: Set by libavcodec */ int nb_samples; From 1bc035bc03542c0b2215effc0e53c5c9d2e786ac Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 16:29:37 -0500 Subject: [PATCH 11/18] ape: return error if seeking to the current packet fails in ape_read_packet() --- libavformat/ape.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/ape.c b/libavformat/ape.c index 345648eb33014..a6e9bf1d79357 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -361,7 +361,8 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt) if (ape->currentframe > ape->totalframes) return AVERROR(EIO); - avio_seek (s->pb, ape->frames[ape->currentframe].pos, SEEK_SET); + if (avio_seek(s->pb, ape->frames[ape->currentframe].pos, SEEK_SET) < 0) + return AVERROR(EIO); /* Calculate how many blocks there are in this frame */ if (ape->currentframe == (ape->totalframes - 1)) From 66f7be3603b527153daaae0999c743eb1438c7e5 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 16:31:37 -0500 Subject: [PATCH 12/18] ape: return AVERROR_EOF instead of AVERROR(EIO) when demuxing is finished --- libavformat/ape.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/ape.c b/libavformat/ape.c index a6e9bf1d79357..853fdcac7e155 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -357,9 +357,9 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt) uint32_t extra_size = 8; if (s->pb->eof_reached) - return AVERROR(EIO); + return AVERROR_EOF; if (ape->currentframe > ape->totalframes) - return AVERROR(EIO); + return AVERROR_EOF; if (avio_seek(s->pb, ape->frames[ape->currentframe].pos, SEEK_SET) < 0) return AVERROR(EIO); From c2c316158fb670f61abfa108cb940ba31264b0f8 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 16:34:20 -0500 Subject: [PATCH 13/18] ape: stop reading after the last frame has been read This avoids buffer overread when the last packet size estimate is too small. --- libavformat/ape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/ape.c b/libavformat/ape.c index 853fdcac7e155..c650a54ad4088 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -358,7 +358,7 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt) if (s->pb->eof_reached) return AVERROR_EOF; - if (ape->currentframe > ape->totalframes) + if (ape->currentframe >= ape->totalframes) return AVERROR_EOF; if (avio_seek(s->pb, ape->frames[ape->currentframe].pos, SEEK_SET) < 0) From ac3f8d317c5d1e78340b57ebd2b5c1317e175bc2 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 17:01:03 -0500 Subject: [PATCH 14/18] ape: calculate final packet size instead of guessing Calculates based on total file size and wavetaillength from the header. Falls back to multiplying finalframeblocks by 8 instead of 4 so that it will at least be overestimating for 24-bit. Currently it can underestimate the final packet size, leading to decoding errors. --- libavformat/ape.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libavformat/ape.c b/libavformat/ape.c index c650a54ad4088..8145db3a767c6 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -159,8 +159,8 @@ static int ape_read_header(AVFormatContext * s) AVStream *st; uint32_t tag; int i; - int total_blocks; - int64_t pts; + int total_blocks, final_size = 0; + int64_t pts, file_size; /* Skip any leading junk such as id3v2 tags */ ape->junklength = avio_tell(pb); @@ -289,8 +289,17 @@ static int ape_read_header(AVFormatContext * s) ape->frames[i - 1].size = ape->frames[i].pos - ape->frames[i - 1].pos; ape->frames[i].skip = (ape->frames[i].pos - ape->frames[0].pos) & 3; } - ape->frames[ape->totalframes - 1].size = ape->finalframeblocks * 4; ape->frames[ape->totalframes - 1].nblocks = ape->finalframeblocks; + /* calculate final packet size from total file size, if available */ + file_size = avio_size(pb); + if (file_size > 0) { + final_size = file_size - ape->frames[ape->totalframes - 1].pos - + ape->wavtaillength; + final_size -= final_size & 3; + } + if (file_size <= 0 || final_size <= 0) + final_size = ape->finalframeblocks * 8; + ape->frames[ape->totalframes - 1].size = final_size; for (i = 0; i < ape->totalframes; i++) { if(ape->frames[i].skip){ From f1c3d4a68a743c1b274dc764e54e2df276a7c774 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 17:08:34 -0500 Subject: [PATCH 15/18] ape: skip packets with invalid size --- libavformat/ape.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavformat/ape.c b/libavformat/ape.c index 8145db3a767c6..4d13e4836c3b5 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -379,6 +379,14 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt) else nblocks = ape->blocksperframe; + if (ape->frames[ape->currentframe].size <= 0 || + ape->frames[ape->currentframe].size > INT_MAX - extra_size) { + av_log(s, AV_LOG_ERROR, "invalid packet size: %d\n", + ape->frames[ape->currentframe].size); + ape->currentframe++; + return AVERROR(EIO); + } + if (av_new_packet(pkt, ape->frames[ape->currentframe].size + extra_size) < 0) return AVERROR(ENOMEM); From ec1f3cab2061531d9b200213afeb5614f880d5d4 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 17:32:26 -0500 Subject: [PATCH 16/18] avplay: reset decoder flush state when seeking Fixes seeking after decoder has already been flushed for codecs using CODEC_CAP_DELAY. --- avplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/avplay.c b/avplay.c index f20b6315fb6b6..96551a677ea06 100644 --- a/avplay.c +++ b/avplay.c @@ -2114,8 +2114,10 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr) if ((new_packet = packet_queue_get(&is->audioq, pkt, 1)) < 0) return -1; - if (pkt->data == flush_pkt.data) + if (pkt->data == flush_pkt.data) { avcodec_flush_buffers(dec); + flush_complete = 0; + } *pkt_temp = *pkt; From 32f3c541bcddd1313212792c78c5ae643570b904 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 5 Feb 2012 11:31:33 +0100 Subject: [PATCH 17/18] doxygen: Do not include license boilerplates in Doxygen comment blocks. --- libavcodec/alacenc.c | 2 +- libavcodec/arm/vp8.h | 2 +- libavcodec/arm/vp8_armv6.S | 2 +- libavcodec/arm/vp8dsp_init_arm.c | 2 +- libavcodec/arm/vp8dsp_neon.S | 2 +- libavcodec/flacenc.c | 2 +- libavcodec/jfdctint.c | 2 +- libavcodec/lpc.c | 2 +- libavcodec/lpc.h | 2 +- libavcodec/ppc/vp8dsp_altivec.c | 2 +- libavcodec/vp8.c | 2 +- libavcodec/vp8.h | 2 +- libavformat/rtpdec_latm.c | 2 +- libavformat/rtpdec_mpeg4.c | 2 +- libavformat/rtpdec_qcelp.c | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c index 89d8e09795dbe..19708eb4316a3 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -1,4 +1,4 @@ -/** +/* * ALAC audio encoder * Copyright (c) 2008 Jaikrishnan Menon * diff --git a/libavcodec/arm/vp8.h b/libavcodec/arm/vp8.h index 76a0397a8d254..0fb4edfbab23c 100644 --- a/libavcodec/arm/vp8.h +++ b/libavcodec/arm/vp8.h @@ -1,4 +1,4 @@ -/** +/* * This file is part of Libav. * * Libav is free software; you can redistribute it and/or diff --git a/libavcodec/arm/vp8_armv6.S b/libavcodec/arm/vp8_armv6.S index 594046d709384..c9dc30b46d4bc 100644 --- a/libavcodec/arm/vp8_armv6.S +++ b/libavcodec/arm/vp8_armv6.S @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2010 Mans Rullgard * * This file is part of Libav. diff --git a/libavcodec/arm/vp8dsp_init_arm.c b/libavcodec/arm/vp8dsp_init_arm.c index 269c6e3f72637..5eea8464dd19b 100644 --- a/libavcodec/arm/vp8dsp_init_arm.c +++ b/libavcodec/arm/vp8dsp_init_arm.c @@ -1,4 +1,4 @@ -/** +/* * This file is part of Libav. * * Libav is free software; you can redistribute it and/or diff --git a/libavcodec/arm/vp8dsp_neon.S b/libavcodec/arm/vp8dsp_neon.S index 4ff53ad70feb6..e9f5b298ce743 100644 --- a/libavcodec/arm/vp8dsp_neon.S +++ b/libavcodec/arm/vp8dsp_neon.S @@ -1,4 +1,4 @@ -/** +/* * VP8 NEON optimisations * * Copyright (c) 2010 Rob Clark diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 47fcca1b40dbe..900714120ac91 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -1,4 +1,4 @@ -/** +/* * FLAC audio encoder * Copyright (c) 2006 Justin Ruggles * diff --git a/libavcodec/jfdctint.c b/libavcodec/jfdctint.c index 0482bc56434ef..ed6b7ffca2b1d 100644 --- a/libavcodec/jfdctint.c +++ b/libavcodec/jfdctint.c @@ -1,4 +1,4 @@ -/** +/* * This file is part of Libav. * * Libav is free software; you can redistribute it and/or diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c index d1833cbed7aa3..0d6910fd2d974 100644 --- a/libavcodec/lpc.c +++ b/libavcodec/lpc.c @@ -1,4 +1,4 @@ -/** +/* * LPC utility code * Copyright (c) 2006 Justin Ruggles * diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h index 2a944b6f48989..1775374a40c96 100644 --- a/libavcodec/lpc.h +++ b/libavcodec/lpc.h @@ -1,4 +1,4 @@ -/** +/* * LPC utility code * Copyright (c) 2006 Justin Ruggles * diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c index 06874b8b878d5..bdda7df505be1 100644 --- a/libavcodec/ppc/vp8dsp_altivec.c +++ b/libavcodec/ppc/vp8dsp_altivec.c @@ -1,4 +1,4 @@ -/** +/* * VP8 compatible video decoder * * Copyright (C) 2010 David Conrad diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 833819890de4a..7669af1ed1f9a 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1,4 +1,4 @@ -/** +/* * VP8 compatible video decoder * * Copyright (C) 2010 David Conrad diff --git a/libavcodec/vp8.h b/libavcodec/vp8.h index 6cbdca2d884e3..a738cb76e004b 100644 --- a/libavcodec/vp8.h +++ b/libavcodec/vp8.h @@ -1,4 +1,4 @@ -/** +/* * VP8 compatible video decoder * * Copyright (C) 2010 David Conrad diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c index 96f4e83c6eddb..ed0a4355141b7 100644 --- a/libavformat/rtpdec_latm.c +++ b/libavformat/rtpdec_latm.c @@ -1,4 +1,4 @@ -/** +/* * RTP Depacketization of MP4A-LATM, RFC 3016 * Copyright (c) 2010 Martin Storsjo * diff --git a/libavformat/rtpdec_mpeg4.c b/libavformat/rtpdec_mpeg4.c index b143c1aee87b6..99792c9628689 100644 --- a/libavformat/rtpdec_mpeg4.c +++ b/libavformat/rtpdec_mpeg4.c @@ -1,4 +1,4 @@ -/** +/* * Common code for the RTP depacketization of MPEG-4 formats. * Copyright (c) 2010 Fabrice Bellard * Romain Degez diff --git a/libavformat/rtpdec_qcelp.c b/libavformat/rtpdec_qcelp.c index 325683c3961f3..23826132db982 100644 --- a/libavformat/rtpdec_qcelp.c +++ b/libavformat/rtpdec_qcelp.c @@ -1,4 +1,4 @@ -/** +/* * RTP Depacketization of QCELP/PureVoice, RFC 2658 * Copyright (c) 2010 Martin Storsjo * From d016d3074cc084ea813e389f046eee01ecd48b7e Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 6 Feb 2012 17:54:39 +0000 Subject: [PATCH 18/18] Revert "v210enc: use FFALIGN()" FFALIGN doesn't work with non-powers-of-2. This reverts commit 7ad1b612c8a2a1b1b47f6c3c580ced4bca17e1c7. Signed-off-by: Paul B Mahol Signed-off-by: Anton Khirnov --- libavcodec/v210enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 17b3a9a6e2c06..77cb30bbfe626 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -53,7 +53,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data) { const AVFrame *pic = data; - int aligned_width = FFALIGN(avctx->width, 48); + int aligned_width = ((avctx->width + 47) / 48) * 48; int stride = aligned_width * 8 / 3; int h, w; const uint16_t *y = (const uint16_t*)pic->data[0];