[FFmpeg-cvslog] Call avcodec_set_dimensions() instead of simply setting avctx->width/height
Kostya Shishkov
git
Sun Feb 20 19:30:47 CET 2011
ffmpeg | branch: release/0.5 | Kostya Shishkov <kostya.shishkov at gmail.com> | Tue Nov 24 06:05:41 2009 +0000| [808f9ce727fb05058a43de8d64539eddf5fa74d6] | committer: Reinhard Tartler
Call avcodec_set_dimensions() instead of simply setting avctx->width/height
when frame dimensions change in RV3/4.
Originally committed as revision 20595 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit d90aeeaf569e4a08c30b3d1d09c3cff3a86eb431)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=808f9ce727fb05058a43de8d64539eddf5fa74d6
---
libavcodec/rv34.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 9fe3919..4d8d968 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1247,8 +1247,9 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int
if(s->width != r->si.width || s->height != r->si.height){
av_log(s->avctx, AV_LOG_DEBUG, "Changing dimensions to %dx%d\n", r->si.width,r->si.height);
MPV_common_end(s);
- s->width = s->avctx->width = r->si.width;
- s->height = s->avctx->height = r->si.height;
+ s->width = r->si.width;
+ s->height = r->si.height;
+ avcodec_set_dimensions(s->avctx, s->width, s->height);
if(MPV_common_init(s) < 0)
return -1;
r->intra_types_hist = av_realloc(r->intra_types_hist, s->b4_stride * 4 * 2 * sizeof(*r->intra_types_hist));
More information about the ffmpeg-cvslog
mailing list