Skip to content

Commit 1fe5145

Browse files
Merge pull request #60 from ldm0/master
Demo code bug fix.
2 parents 860b6b8 + 0f0aefd commit 1fe5145

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

0_hello_world.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ int main(int argc, const char *argv[])
122122
}
123123

124124
// print its name, id and bitrate
125-
logging("\tCodec %s ID %d bit_rate %lld", pLocalCodec->name, pLocalCodec->id, pCodecParameters->bit_rate);
125+
logging("\tCodec %s ID %d bit_rate %lld", pLocalCodec->name, pLocalCodec->id, pLocalCodecParameters->bit_rate);
126126
}
127127
// https://ffmpeg.org/doxygen/trunk/structAVCodecContext.html
128128
AVCodecContext *pCodecContext = avcodec_alloc_context3(pCodec);
@@ -186,7 +186,6 @@ int main(int argc, const char *argv[])
186186
logging("releasing all the resources");
187187

188188
avformat_close_input(&pFormatContext);
189-
avformat_free_context(pFormatContext);
190189
av_packet_free(&pPacket);
191190
av_frame_free(&pFrame);
192191
avcodec_free_context(&pCodecContext);

0 commit comments

Comments
 (0)