Mercurial > libavformat.hg
changeset 90:27d6df9208d4 libavformat
merging a small amount of the changes from BroadQ, the rest is either not clean / doesnt apply / or is PS2 specific (someone with a PS2 should merge/send a patch for the later)
author | michaelni |
---|---|
date | Tue, 18 Mar 2003 17:22:23 +0000 |
parents | 8e3cf4e9fc5a |
children | 0c5a7b4ccca9 |
files | avienc.c utils.c |
diffstat | 2 files changed, 52 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/avienc.c Sun Mar 16 21:03:20 2003 +0000 +++ b/avienc.c Tue Mar 18 17:22:23 2003 +0000 @@ -59,6 +59,13 @@ { CODEC_ID_H263, MKTAG('H', '2', '6', '3') }, { CODEC_ID_H263P, MKTAG('H', '2', '6', '3') }, { CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */ + + /* added based on MPlayer */ + { CODEC_ID_H263I, MKTAG('i', '2', '6', '3') }, + { CODEC_ID_H263P, MKTAG('U', '2', '6', '3') }, + { CODEC_ID_H263P, MKTAG('h', '2', '6', '3') }, + { CODEC_ID_H263P, MKTAG('v', 'i', 'v', '1') }, + { CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') }, { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X'), .invalid_asf = 1 }, { CODEC_ID_MPEG4, MKTAG('d', 'i', 'v', 'x'), .invalid_asf = 1 }, @@ -70,12 +77,54 @@ { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') }, { CODEC_ID_MPEG4, MKTAG('m', '4', 's', '2') }, { CODEC_ID_MPEG4, MKTAG(0x04, 0, 0, 0) }, /* some broken avi use this */ + + /* added based on MPlayer */ + { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') }, + { CODEC_ID_MPEG4, MKTAG('d', 'i', 'v', '1') }, + { CODEC_ID_MPEG4, MKTAG('X', 'v', 'i', 'D') }, + { CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') }, + { CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') }, + { CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') }, + { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3'), .invalid_asf = 1 }, /* default signature when using MSMPEG4 */ { CODEC_ID_MSMPEG4V3, MKTAG('d', 'i', 'v', '3'), .invalid_asf = 1 }, { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') }, + + /* added based on MPlayer */ + { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') }, + { CODEC_ID_MSMPEG4V3, MKTAG('m', 'p', 'g', '3') }, + { CODEC_ID_MSMPEG4V3, MKTAG('m', 'p', '4', '3') }, + { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') }, + { CODEC_ID_MSMPEG4V3, MKTAG('d', 'i', 'v', '5') }, + { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') }, + { CODEC_ID_MSMPEG4V3, MKTAG('d', 'i', 'v', '6') }, + { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') }, + { CODEC_ID_MSMPEG4V3, MKTAG('d', 'i', 'v', '4') }, + { CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') }, + { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') }, + { CODEC_ID_MSMPEG4V3, MKTAG('c', 'o', 'l', '1') }, + { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') }, + { CODEC_ID_MSMPEG4V3, MKTAG('c', 'o', 'l', '0') }, + { CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') }, + + /* added based on MPlayer */ + { CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') }, + { CODEC_ID_MSMPEG4V2, MKTAG('d', 'i', 'v', '2') }, + { CODEC_ID_MSMPEG4V2, MKTAG('m', 'p', '4', '2') }, + { CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') }, + + /* added based on MPlayer */ + { CODEC_ID_MSMPEG4V1, MKTAG('D', 'I', 'V', '4') }, + { CODEC_ID_MSMPEG4V1, MKTAG('d', 'i', 'v', '4') }, + { CODEC_ID_MSMPEG4V1, MKTAG('m', 'p', 'g', '4') }, + { CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') }, + + /* added based on MPlayer */ + { CODEC_ID_WMV1, MKTAG('w', 'm', 'v', '1') }, + { CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') }, { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') }, { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') },
--- a/utils.c Sun Mar 16 21:03:20 2003 +0000 +++ b/utils.c Tue Mar 18 17:22:23 2003 +0000 @@ -355,7 +355,7 @@ /* if still no format found, error */ if (!fmt) { err = AVERROR_NOFMT; - goto fail; + goto fail1; } /* XXX: suppress this hack for redirectors */ @@ -383,7 +383,7 @@ ic->priv_data = av_mallocz(fmt->priv_data_size); if (!ic->priv_data) { err = AVERROR_NOMEM; - goto fail; + goto fail1; } } else ic->priv_data = NULL; @@ -397,7 +397,7 @@ *ic_ptr = ic; return 0; fail1: - if (!(fmt->flags & AVFMT_NOFILE)) { + if (!fmt || !(fmt->flags & AVFMT_NOFILE)) { url_fclose(&ic->pb); } fail: