Allocate AVPacket for stream->pending

From FFmpeg/doc/APIchanges:

    2021-03-17 - f7db77bd87 - lavc 58.133.100 - codec.h
      Deprecated av_init_packet(). Once removed, sizeof(AVPacket) will
      no longer be a part of the public ABI.

Remove the has_pending boolean, which can be replaced by:

    stream->pending != NULL

Refs #2302 <https://github.com/Genymobile/scrcpy/issues/2302>
This commit is contained in:
Romain Vimont
2021-06-14 09:07:49 +02:00
parent a5d71eee45
commit e8b053ad2f
2 changed files with 26 additions and 21 deletions

View File

@@ -24,8 +24,7 @@ struct stream {
AVCodecParserContext *parser;
// successive packets may need to be concatenated, until a non-config
// packet is available
bool has_pending;
AVPacket pending;
AVPacket *pending;
const struct stream_callbacks *cbs;
void *cbs_userdata;