aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/eacmv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-05 01:42:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-05 01:42:06 +0100
commite7724f346a92195b15659bae44114826c6d12f18 (patch)
treedb790b8eb2ddd382de2a4effb1a4644257864ba2 /libavcodec/eacmv.c
parentd80b9ea11da1680a3373a52a6031e2717cade25b (diff)
parent5430839144c6da0160e8e0cfb0c8db01de432e94 (diff)
downloadffmpeg-e7724f346a92195b15659bae44114826c6d12f18.tar.gz
Merge commit '5430839144c6da0160e8e0cfb0c8db01de432e94'
* commit '5430839144c6da0160e8e0cfb0c8db01de432e94': eacmv: clear references on frame dimensions change Conflicts: libavcodec/eacmv.c See: e9d443cf08503f7bd0149576ba9e891322de340d Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/eacmv.c')
-rw-r--r--libavcodec/eacmv.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c
index 8abc0a6147..4a1af8cf43 100644
--- a/libavcodec/eacmv.c
+++ b/libavcodec/eacmv.c
@@ -141,14 +141,17 @@ static int cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t *
s->width = AV_RL16(&buf[4]);
s->height = AV_RL16(&buf[6]);
- if (s->avctx->width!=s->width || s->avctx->height!=s->height) {
+
+ if (s->width != s->avctx->width ||
+ s->height != s->avctx->height) {
av_frame_unref(s->last_frame);
av_frame_unref(s->last2_frame);
- ret = ff_set_dimensions(s->avctx, s->width, s->height);
- if (ret < 0)
- return ret;
}
+ ret = ff_set_dimensions(s->avctx, s->width, s->height);
+ if (ret < 0)
+ return ret;
+
fps = AV_RL16(&buf[10]);
if (fps > 0)
s->avctx->time_base = (AVRational){ 1, fps };