aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-03-18 17:22:23 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-03-18 17:22:23 +0000
commita05c8d7177857c8a78144cbccc512c282065195a (patch)
treeec0abaadaa0b145b37324eac5c79a9d9fb35b954 /libavformat
parentc5a9ab69c26c6c3c567195c748671677d36a908f (diff)
downloadffmpeg-a05c8d7177857c8a78144cbccc512c282065195a.tar.gz
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)
Originally committed as revision 1690 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avienc.c49
-rw-r--r--libavformat/utils.c6
2 files changed, 52 insertions, 3 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 8617b68373..e38b94af0b 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -59,6 +59,13 @@ const CodecTag codec_bmp_tags[] = {
{ 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 @@ const CodecTag codec_bmp_tags[] = {
{ 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') },
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1c1c406606..46dc4ea21c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -355,7 +355,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
/* 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 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
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 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
*ic_ptr = ic;
return 0;
fail1:
- if (!(fmt->flags & AVFMT_NOFILE)) {
+ if (!fmt || !(fmt->flags & AVFMT_NOFILE)) {
url_fclose(&ic->pb);
}
fail: