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 {
286286 return ;
287287 }
288288
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-
294289 if (!(outputFormatContext->oformat ->flags & AVFMT_NOFILE)) {
295290 if (avio_open (&outputFormatContext->pb , outputMp4File.string ().c_str (), AVIO_FLAG_WRITE) < 0 ) {
296291 geode::log::error (" Could not open output file." );
@@ -312,7 +307,7 @@ namespace ffmpeg {
312307 while (true ) {
313308 if (av_read_frame (videoFormatContext, &packet) >= 0 ) {
314309 av_packet_rescale_ts (&packet, videoFormatContext->streams [videoStreamIndex]->time_base , outputVideoStream->time_base );
315- packet.stream_index = 0 ;
310+ packet.stream_index = videoStreamIndex ;
316311 av_interleaved_write_frame (outputFormatContext, &packet);
317312 av_packet_unref (&packet);
318313 } else {
You can’t perform that action at this time.
0 commit comments