From e7f0bc8c0f1c4a8731eb1c33cb013296a0555538 Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Sun, 5 Feb 2012 00:14:15 +0200 Subject: 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 dcde542118..c5a6ffe60f 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); -- cgit v1.2.3 From 2b43dfce3651bc517c66365a30f30b708d6b79af Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Sun, 5 Feb 2012 00:14:16 +0200 Subject: 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 c5a6ffe60f..f6ce1243e6 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; } -- cgit v1.2.3 From e496c45d9ba58586b3826c0bd9e4be155b8fd1df Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Sun, 5 Feb 2012 14:41:01 +0200 Subject: 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 4e7ede23a4..16059fd41d 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 f6ce1243e6..5b794dc545 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); -- cgit v1.2.3 From d73466f841b1732e4e817bf51f2153c4bab00428 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:34 +0000 Subject: 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 58613520a5..069f915158 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; -- cgit v1.2.3 From 66fa2a1fb371a393b6e03bf85efb08d4df9a7f75 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:35 +0000 Subject: 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 069f915158..6266bb96b1 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; -- cgit v1.2.3 From b5f50da593b2207dbcc9bde9c3662a5fb397a546 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:36 +0000 Subject: 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 6266bb96b1..c31254ebc7 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) -- cgit v1.2.3 From 7ad1b612c8a2a1b1b47f6c3c580ced4bca17e1c7 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:37 +0000 Subject: 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 c31254ebc7..00a89025d2 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]; -- cgit v1.2.3 From 986c1c483befa717ee20710e21f5a5c014666c6e Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:38 +0000 Subject: 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 00a89025d2..17b3a9a6e2 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); } -- cgit v1.2.3 From 3cc0353f8d4eaa4862450bbe517e7fcf8be4f2bd Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 5 Feb 2012 21:14:39 +0000 Subject: 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 37b4a3c423..d464572f78 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; } -- cgit v1.2.3 From 9814974d2e4c7f3f7fda6cd45ab330b20bc88452 Mon Sep 17 00:00:00 2001 From: Kieran Kunhya Date: Sun, 5 Feb 2012 04:28:58 -0600 Subject: 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 fcbb68ad60..05e8b9c05b 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; -- cgit v1.2.3 From 1bc035bc03542c0b2215effc0e53c5c9d2e786ac Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 16:29:37 -0500 Subject: 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 345648eb33..a6e9bf1d79 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)) -- cgit v1.2.3 From 66f7be3603b527153daaae0999c743eb1438c7e5 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 16:31:37 -0500 Subject: 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 a6e9bf1d79..853fdcac7e 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); -- cgit v1.2.3 From c2c316158fb670f61abfa108cb940ba31264b0f8 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 16:34:20 -0500 Subject: 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 853fdcac7e..c650a54ad4 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) -- cgit v1.2.3 From ac3f8d317c5d1e78340b57ebd2b5c1317e175bc2 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 17:01:03 -0500 Subject: 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 c650a54ad4..8145db3a76 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){ -- cgit v1.2.3 From f1c3d4a68a743c1b274dc764e54e2df276a7c774 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 17:08:34 -0500 Subject: 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 8145db3a76..4d13e4836c 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); -- cgit v1.2.3 From ec1f3cab2061531d9b200213afeb5614f880d5d4 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 4 Feb 2012 17:32:26 -0500 Subject: 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 f20b6315fb..96551a677e 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; -- cgit v1.2.3 From 32f3c541bcddd1313212792c78c5ae643570b904 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 5 Feb 2012 11:31:33 +0100 Subject: 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 89d8e09795..19708eb431 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 76a0397a8d..0fb4edfbab 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 594046d709..c9dc30b46d 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 269c6e3f72..5eea8464dd 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 4ff53ad70f..e9f5b298ce 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 47fcca1b40..900714120a 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 0482bc5643..ed6b7ffca2 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 d1833cbed7..0d6910fd2d 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 2a944b6f48..1775374a40 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 06874b8b87..bdda7df505 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 833819890d..7669af1ed1 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 6cbdca2d88..a738cb76e0 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 96f4e83c6e..ed0a435514 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 b143c1aee8..99792c9628 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 325683c396..23826132db 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 * -- cgit v1.2.3 From d016d3074cc084ea813e389f046eee01ecd48b7e Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 6 Feb 2012 17:54:39 +0000 Subject: 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 17b3a9a6e2..77cb30bbfe 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]; -- cgit v1.2.3