FS-7500: clean up logic of encoder flow and set rules on return values and tweak some codec settings on vp8

This commit is contained in:
Anthony Minessale
2014-11-19 14:48:14 -06:00
committed by Michael Jerris
parent ec9b7c0499
commit d7af2b128c
3 changed files with 42 additions and 30 deletions

View File

@@ -809,12 +809,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_encode_video(switch_codec_t *c
if (codec->implementation->encode_video) {
status = codec->implementation->encode_video(codec, frame);
if (frame->datalen) {
frame->packetlen = frame->datalen + 12;
if (status == SWITCH_STATUS_MORE_DATA) {
frame->flags |= SFF_SAME_IMAGE;
} else {
frame->flags &= ~SFF_SAME_IMAGE;
}
frame->packetlen = frame->datalen + 12;
}
if (codec->mutex) switch_mutex_unlock(codec->mutex);