Skip to content

Commit 82df59d

Browse files
Merge pull request #128 from AndreiCherniaev/master
Fix dereference a pointer
2 parents 68b5a5f + 799ef91 commit 82df59d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -750,10 +750,10 @@ Now we're going to set up the decoder, the `AVFormatContext` will give us access
750750
for (int i = 0; i < avfc->nb_streams; i++)
751751
{
752752
AVStream *avs = avfc->streams[i];
753-
AVCodec *avc = avcodec_find_decoder(avs->codecpar->codec_id);
754-
AVCodecContext *avcc = avcodec_alloc_context3(*avc);
755-
avcodec_parameters_to_context(*avcc, avs->codecpar);
756-
avcodec_open2(*avcc, *avc, NULL);
753+
const AVCodec *avc = avcodec_find_decoder(avs->codecpar->codec_id);
754+
AVCodecContext *avcc = avcodec_alloc_context3(avc);
755+
avcodec_parameters_to_context(avcc, avs->codecpar);
756+
avcodec_open2(avcc, avc, NULL);
757757
}
758758
```
759759

0 commit comments

Comments
 (0)