Opened 11 years ago

Closed 11 years ago

#1996 closed enhancement (fixed)

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

Reported by: Igor 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 by Carl Eugen Hoyos, 11 years ago

Priority: normalwish
Status: newopen
Type: defectenhancement
Version: unspecifiedgit-master

Consider sending a patch to ffmpeg-devel

comment:2 by Igor, 11 years ago

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

comment:3 by Carl Eugen Hoyos, 11 years ago

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 by Michael Niedermayer, 11 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.