You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavc: Map deprecated codec ids to ours so as to maintain compatibility with the fork.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -954,10 +954,21 @@ av_cold int avcodec_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static enum CodecID remap_deprecated_codec_id(enum CodecID id)
|
||||||
|
{
|
||||||
|
switch(id){
|
||||||
|
case CODEC_ID_G723_1_DEPRECATED : return CODEC_ID_G723_1;
|
||||||
|
case CODEC_ID_G729_DEPRECATED : return CODEC_ID_G729;
|
||||||
|
case CODEC_ID_UTVIDEO_DEPRECATED: return CODEC_ID_UTVIDEO;
|
||||||
|
default : return id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AVCodec *avcodec_find_encoder(enum CodecID id)
|
AVCodec *avcodec_find_encoder(enum CodecID id)
|
||||||
{
|
{
|
||||||
AVCodec *p, *experimental=NULL;
|
AVCodec *p, *experimental=NULL;
|
||||||
p = first_avcodec;
|
p = first_avcodec;
|
||||||
|
id= remap_deprecated_codec_id(id);
|
||||||
while (p) {
|
while (p) {
|
||||||
if (p->encode != NULL && p->id == id) {
|
if (p->encode != NULL && p->id == id) {
|
||||||
if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
|
if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
|
||||||
@@ -988,6 +999,7 @@ AVCodec *avcodec_find_decoder(enum CodecID id)
|
|||||||
{
|
{
|
||||||
AVCodec *p, *experimental=NULL;
|
AVCodec *p, *experimental=NULL;
|
||||||
p = first_avcodec;
|
p = first_avcodec;
|
||||||
|
id= remap_deprecated_codec_id(id);
|
||||||
while (p) {
|
while (p) {
|
||||||
if (p->decode != NULL && p->id == id) {
|
if (p->decode != NULL && p->id == id) {
|
||||||
if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
|
if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
|
||||||
|
Reference in New Issue
Block a user