Skip to content

Commit

Permalink
Changed H.264/H.265 decoding thread type
Browse files Browse the repository at this point in the history
  • Loading branch information
Keukhan committed Aug 20, 2024
1 parent b53080a commit eb6a8df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/projects/transcoder/codec/decoder/decoder_avc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool DecoderAVC::InitCodec()

_context->time_base = ffmpeg::Conv::TimebaseToAVRational(GetTimebase());
_context->thread_count = 2;
_context->thread_type = FF_THREAD_SLICE;
_context->thread_type = FF_THREAD_FRAME;

// Set the number of b frames for compatibility with specific encoders.
auto bframes = GetRefTrack()->HasBframes()?1:0;
Expand Down
2 changes: 1 addition & 1 deletion src/projects/transcoder/codec/decoder/decoder_hevc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool DecoderHEVC::InitCodec()

_context->time_base = ffmpeg::Conv::TimebaseToAVRational(GetTimebase());
_context->thread_count = 2;
_context->thread_type = FF_THREAD_SLICE;
_context->thread_type = FF_THREAD_FRAME;

if (::avcodec_open2(_context, _codec, nullptr) < 0)
{
Expand Down

0 comments on commit eb6a8df

Please sign in to comment.