leandromoreira / leandromoreira/ffmpeg-libav-tutorial

Change pCodecParameters to pLocalCodecParameters in README.md

Open Beginner friendly
#37 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Hi, I noticed this line of code in README.md

printf("\tCodec %s ID %d bit_rate %lld", pLocalCodec->long_name, pLocalCodec->id, pCodecParameters->bit_rate);

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.

https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/cdd616ce871078ebb67601af207f10a299914e19/0_hello_world.c#L110

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.

UPDATE
This line of code has the same problem:

AVCodecContext *pCodecContext = avcodec_alloc_context3(pCodec);

Maybe it will be better to replace pCodec with pLocalCodec.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open README.md and compare the affected snippets with 0_hello_world.c at the linked line 110. Update the undeclared codec variable references in the README, and review the requested newline additions to the printf examples. Done means the README snippets use the declared variables and present the intended output clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.