Skip to content

Commit d0b1b21

Browse files
Add support for FLV and RTMP
1 parent 3dc7c65 commit d0b1b21

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

FFmpegWrapper/FFOutputStream.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ - (void) setupVideoContextWithWidth:(int)width height:(int)height {
2929
AVCodecContext *c = self.stream->codec;
3030
avcodec_get_context_defaults3(c, NULL);
3131
c->codec_id = CODEC_ID_H264;
32+
c->codec_type = AVMEDIA_TYPE_VIDEO;
3233
c->width = width;
3334
c->height = height;
3435
c->time_base.den = 30;
@@ -43,8 +44,7 @@ - (void) setupAudioContextWithSampleRate:(int)sampleRate {
4344
/* find the audio encoder */
4445
avcodec_get_context_defaults3(codecContext, NULL);
4546
codecContext->codec_id = CODEC_ID_AAC;
46-
47-
47+
codecContext->codec_type = AVMEDIA_TYPE_AUDIO;
4848

4949
//st->id = 1;
5050
codecContext->strict_std_compliance = FF_COMPLIANCE_UNOFFICIAL; // for native aac support

0 commit comments

Comments
 (0)