Opened 5 years ago

Closed 5 years ago

#1996 closed enhancement (fixed)

why avcodec_get_context_defaults3 does NOT set codec_id field corresponding to the gived codec?

Reported by: theateist Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The documentation of "avcodec_get_context_defaults3" says:
Set the fields of the given AVCodecContext to default values corresponding to the given codec.

But it doesn't set some fields, for example "codec_id", why?

auto encoder = avcodec_find_encoder(AV_CODEC_ID_H264);
avcodec_get_context_defaults3(outStream->codec, encoder);

Change History (4)

comment:1 Changed 5 years ago by cehoyos

  • Priority changed from normal to wish
  • Status changed from new to open
  • Type changed from defect to enhancement
  • Version changed from unspecified to git-master

Consider sending a patch to ffmpeg-devel

comment:2 Changed 5 years ago by theateist

How to send the patch, just add the code and send options.c file to you?

comment:3 Changed 5 years ago by cehoyos

No.

First clone ffmpeg git as explained on http://ffmpeg.org/download.html (first paragraph).
Then make your changes.
Then either produce a diff file with the following command:
$ git diff >set_codec_id.diff
and send the resulting file with an explanation to ffmpeg-devel

or use this preferred variant:
Commit the changes you made to your local repository and either use "git send-email" to send your changes to the mailing list or use "git format-patch" to produce a - more useful than above - diff file that you can send as an attachment, see http://ffmpeg.org/developer.html

comment:4 Changed 5 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.