File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -286,11 +286,6 @@ namespace ffmpeg {
286
286
return ;
287
287
}
288
288
289
- outputVideoStream->codecpar ->codec_id = AV_CODEC_ID_H264;
290
- outputVideoStream->codecpar ->codec_type = AVMEDIA_TYPE_VIDEO;
291
- outputFormatContext->video_codec = avcodec_find_encoder (AV_CODEC_ID_H264);
292
- outputFormatContext->video_codec_id = AV_CODEC_ID_H264;
293
-
294
289
if (!(outputFormatContext->oformat ->flags & AVFMT_NOFILE)) {
295
290
if (avio_open (&outputFormatContext->pb , outputMp4File.string ().c_str (), AVIO_FLAG_WRITE) < 0 ) {
296
291
geode::log::error (" Could not open output file." );
@@ -312,7 +307,7 @@ namespace ffmpeg {
312
307
while (true ) {
313
308
if (av_read_frame (videoFormatContext, &packet) >= 0 ) {
314
309
av_packet_rescale_ts (&packet, videoFormatContext->streams [videoStreamIndex]->time_base , outputVideoStream->time_base );
315
- packet.stream_index = 0 ;
310
+ packet.stream_index = videoStreamIndex ;
316
311
av_interleaved_write_frame (outputFormatContext, &packet);
317
312
av_packet_unref (&packet);
318
313
} else {
You can’t perform that action at this time.
0 commit comments