Skip to content

Commit 236fbda

Browse files
zhenghanchaoxinzhengzhang
authored andcommitted
android/MediaCodec: fix live error when change resolution
Signed-off-by: Xinzheng Zhang <zhangxzheng@gmail.com>
1 parent 409b075 commit 236fbda

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

ijkmedia/ijkplayer/android/pipeline/ffpipenode_android_mediacodec_vdec.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,7 @@ static int feed_input_buffer(JNIEnv *env, IJKFF_Pipenode *node, int64_t timeUs,
480480
if (change_ret < 0) {
481481
avcodec_free_context(&new_avctx);
482482
return change_ret;
483-
}
484-
485-
if (got_picture) {
483+
} else {
486484
if (opaque->codecpar->width != new_avctx->width &&
487485
opaque->codecpar->height != new_avctx->height) {
488486
ALOGW("AV_PKT_DATA_NEW_EXTRADATA: %d x %d\n", new_avctx->width, new_avctx->height);

0 commit comments

Comments
 (0)