You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As for a guess, maybe the author firstly write the c code and copy-and-paste these important parts into README and lead to this issue. By the way, I think adding \n afterward printfs could make output looks better. Hope that useful.
Hi, it is now that I finally find that simply replacing pLocalCodec with pLocalCodecParameters might not be a perfect solution. Instead, it might be better to firstly state that when we do the while loop to read AVPacket we need to distinguish video track from sound track. Also, when we create pCodecContext and call avcodec_parameters_to_context, we must use AVCodec and AVCodecParameters from the video track. Thus we need to "remember" them with pCodec etc. What do you think about?
Btw, could you please explain why do we need avformat_alloc_context() for *pFormatContext and why do we need av_frame_unref(pFrame);? So far, assigning NULL to *pFormatContext or remove av_frame_unref did not cause any problem for me. In chapter 2, AVFormatContext was assigned like AVFormatContext *input_format_context = NULL; why this time not avformat_alloc_context()?
Hi, I noticed this line of code in README.md
in which
pLocalCodec
is not declared in the article before used which might cause confusion in my view. Digging into the c code, I found this line.ffmpeg-libav-tutorial/0_hello_world.c
Line 110 in cdd616c
As for a guess, maybe the author firstly write the c code and copy-and-paste these important parts into README and lead to this issue. By the way, I think adding
\n
afterwardprintf
s could make output looks better. Hope that useful.UPDATE
This line of code has the same problem:
Maybe it will be better to replace
pCodec
withpLocalCodec
.The text was updated successfully, but these errors were encountered: