OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f29e5d
)
h263dec: call get_format() on resolution changes
author
Rémi Denis-Courmont
<remi@remlab.net>
Wed, 8 Oct 2014 17:37:01 +0000
(20:37 +0300)
committer
Janne Grunau
<janne-libav@jannau.net>
Mon, 13 Oct 2014 14:05:04 +0000
(16:05 +0200)
Fail safe if the pixel format changes.
libavcodec/h263dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/h263dec.c
b/libavcodec/h263dec.c
index
29634b0
..
31e014a
100644
(file)
--- a/
libavcodec/h263dec.c
+++ b/
libavcodec/h263dec.c
@@
-513,6
+513,12
@@
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if ((ret = ff_mpv_common_frame_size_change(s)))
return ret;
+
+ if (avctx->pix_fmt != h263_get_format(avctx)) {
+ av_log(avctx, AV_LOG_ERROR, "format change not supported\n");
+ avctx->pix_fmt = AV_PIX_FMT_NONE;
+ return AVERROR_UNKNOWN;
+ }
}
if (s->codec_id == AV_CODEC_ID_H263 ||