Skip to content

Commit 977a4e5

Browse files
committed
fix hevc problem with colorspace
1 parent 0bbadf2 commit 977a4e5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/audio_mixer.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)