Remove usage of deprecated AVFrame key_frame field
This commit is contained in:
parent
da6fc0826d
commit
da5559bf7a
1 changed files with 3 additions and 3 deletions
|
|
@ -435,7 +435,7 @@ namespace video {
|
|||
if (device && device->frame) {
|
||||
auto &frame = device->frame;
|
||||
frame->pict_type = AV_PICTURE_TYPE_I;
|
||||
frame->key_frame = 1;
|
||||
frame->flags |= AV_FRAME_FLAG_KEY;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -444,7 +444,7 @@ namespace video {
|
|||
if (device && device->frame) {
|
||||
auto &frame = device->frame;
|
||||
frame->pict_type = AV_PICTURE_TYPE_NONE;
|
||||
frame->key_frame = 0;
|
||||
frame->flags &= ~AV_FRAME_FLAG_KEY;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1295,7 +1295,7 @@ namespace video {
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (frame->key_frame && !(av_packet->flags & AV_PKT_FLAG_KEY)) {
|
||||
if ((frame->flags & AV_FRAME_FLAG_KEY) && !(av_packet->flags & AV_PKT_FLAG_KEY)) {
|
||||
BOOST_LOG(error) << "Encoder did not produce IDR frame when requested!"sv;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue