diff options
author | Martin Storsjo <martin@martin.st> | 2015-06-23 11:14:45 +0300 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2015-06-25 08:25:57 -0700 |
commit | 5ae9fc7e9dbabb80274df8928dd98060c2400066 (patch) | |
tree | c96f52867eb4a7ac735c00f5a177b8570458e33e | |
parent | c22addc6ee9c96f2996001362dbe39dd5e14038d (diff) | |
download | android_external_libavc-5ae9fc7e9dbabb80274df8928dd98060c2400066.tar.gz android_external_libavc-5ae9fc7e9dbabb80274df8928dd98060c2400066.tar.bz2 android_external_libavc-5ae9fc7e9dbabb80274df8928dd98060c2400066.zip |
Force regenerating the header via i4_gen_header instead of i4_header_mode
If i4_header_mode is set (without the caller explicitly requesting it),
the next frame to be encoded will be missed altogether (when only
a header is output).
Instead force a header to be generated prepended to the next frame.
If the caller explicitly requests header mode, it will be output
in a separate call.
Change-Id: If475717edf980bccb2076f880c60c9dd7dede904
-rw-r--r-- | encoder/ih264e_api.c | 2 | ||||
-rw-r--r-- | encoder/ih264e_encode.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/encoder/ih264e_api.c b/encoder/ih264e_api.c index df8d6ec..0dec740 100644 --- a/encoder/ih264e_api.c +++ b/encoder/ih264e_api.c @@ -1869,7 +1869,7 @@ IH264E_ERROR_T ih264e_codec_update_config(codec_t *ps_codec, u4_init_rc = 1; /* when the dimension changes, the header needs to be regenerated */ - ps_codec->i4_header_mode = 1; + ps_codec->i4_gen_header = 1; } } else if (ps_cfg->e_cmd == IVE_CMD_CTL_SET_FRAMERATE) diff --git a/encoder/ih264e_encode.c b/encoder/ih264e_encode.c index 93e7dbd..c027321 100644 --- a/encoder/ih264e_encode.c +++ b/encoder/ih264e_encode.c @@ -358,6 +358,7 @@ WORD32 ih264e_encode(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op) /* header mode tag is not sticky */ ps_codec->i4_header_mode = 0; + ps_codec->i4_gen_header = 0; /* send the input to app */ ps_video_encode_op->s_ive_op.s_inp_buf = s_inp_buf.s_raw_buf; |