... | ... |
@@ -153,6 +153,8 @@ static int open_stream(void *log, MovieStream *st) |
153 | 153 |
return AVERROR(EINVAL); |
154 | 154 |
} |
155 | 155 |
|
156 |
+ st->st->codec->refcounted_frames = 1; |
|
157 |
+ |
|
156 | 158 |
if ((ret = avcodec_open2(st->st->codec, codec, NULL)) < 0) { |
157 | 159 |
av_log(log, AV_LOG_ERROR, "Failed to open codec\n"); |
158 | 160 |
return ret; |