Re: [FFmpeg-devel] [PATCH]Do not list mov codecs in riff.c

2015-03-13 Thread Carl Eugen Hoyos
Michael Niedermayer michaelni at gmx.at writes:

   avidec.c |7 +++
   riff.c   |3 ---
   2 files changed, 7 insertions(+), 3 deletions(-)
  7c301d00fc64be53584b4f6a2f54461bb85447e7  patchproresavi.diff
  diff --git a/libavformat/avidec.c b/libavformat/avidec.c
  index 5c9443a..00f0037 100644
 
 LGTM

Patch applied.

Thank you, Carl Eugen

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Do not list mov codecs in riff.c

2015-03-13 Thread wm4
On Fri, 13 Mar 2015 02:46:32 +0100
Carl Eugen Hoyos ceho...@ag.or.at wrote:

 diff --git a/libavformat/avidec.c b/libavformat/avidec.c
 index 5c9443a..00f0037 100644
 --- a/libavformat/avidec.c
 +++ b/libavformat/avidec.c
 @@ -36,6 +36,7 @@
  #include riff.h
  #include libavcodec/bytestream.h
  #include libavcodec/exif.h
 +#include libavformat/isom.h
  
  typedef struct AVIStream {
  int64_t frame_offset;   /* current frame (video) or byte (audio) counter
 @@ -773,6 +774,12 @@ static int avi_read_header(AVFormatContext *s)
  st-codec-codec_tag  = tag1;
  st-codec-codec_id   = 
 ff_codec_get_id(ff_codec_bmp_tags,
  tag1);
 +if (!st-codec-codec_id) {
 +st-codec-codec_id = 
 ff_codec_get_id(ff_codec_movvideo_tags,
 +  tag1);
 +if (st-codec-codec_id)
 +   av_log(s, AV_LOG_WARNING, mov tag found in 
 avi\n);
 +}

Nice warning, but why do we accept this in the first place? This looks
so very wrong.

  /* This is needed to get the pict type which is necessary
   * for generating correct pts. */
  st-need_parsing = AVSTREAM_PARSE_HEADERS;
 diff --git a/libavformat/riff.c b/libavformat/riff.c
 index 399523c..696b06b 100644
 --- a/libavformat/riff.c
 +++ b/libavformat/riff.c
 @@ -362,9 +362,6 @@ const AVCodecTag ff_codec_bmp_tags[] = {
  { AV_CODEC_ID_G2M,  MKTAG('G', '2', 'M', '4') },
  { AV_CODEC_ID_G2M,  MKTAG('G', '2', 'M', '5') },
  { AV_CODEC_ID_FIC,  MKTAG('F', 'I', 'C', 'V') },
 -{ AV_CODEC_ID_PRORES,   MKTAG('A', 'P', 'C', 'N') },
 -{ AV_CODEC_ID_PRORES,   MKTAG('A', 'P', 'C', 'H') },
 -{ AV_CODEC_ID_QTRLE,MKTAG('r', 'l', 'e', ' ') },
  { AV_CODEC_ID_HQX,  MKTAG('C', 'H', 'Q', 'X') },
  { AV_CODEC_ID_NONE, 0 }
  };

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Do not list mov codecs in riff.c

2015-03-13 Thread compn
On Fri, 13 Mar 2015 10:11:47 +0100
wm4 nfx...@googlemail.com wrote:

 Nice warning, but why do we accept this in the first place? This looks
 so very wrong.

suggestions are welcome.

1) refuse all invalid files
2) duplicate all riff/isom lists
3) do this instead

maybe people use old software or run into crashes in proprietary
software and sticking mov codecs in avi works around some bug?

in the end people just want it to 'work', and when they get Could not
find codec parameters for stream 1 (Video: none.. , thats not helping.
especially when we already have a decoder and it uses the same tag.

-compn
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Do not list mov codecs in riff.c

2015-03-12 Thread Michael Niedermayer
On Fri, Mar 13, 2015 at 02:46:32AM +0100, Carl Eugen Hoyos wrote:
 On Friday 13 March 2015 02:36:00 am Carl Eugen Hoyos wrote:
  Hi!
 
  Attached patch fixes a regression caused by randomly added
  prores code-points in riff.c (similar to ticket #4307). As
  a side-effect, it shows a warning for such (probably
  invalid) files).
 
 Updated patch attached.
 
 Carl Eugen

  avidec.c |7 +++
  riff.c   |3 ---
  2 files changed, 7 insertions(+), 3 deletions(-)
 7c301d00fc64be53584b4f6a2f54461bb85447e7  patchproresavi.diff
 diff --git a/libavformat/avidec.c b/libavformat/avidec.c
 index 5c9443a..00f0037 100644

LGTM


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]Do not list mov codecs in riff.c

2015-03-12 Thread Carl Eugen Hoyos
Hi!

Attached patch fixes a regression caused by randomly added 
prores code-points in riff.c (similar to ticket #4307). As 
a side-effect, it shows a warning for such (probably 
invalid) files).

Please comment, Carl Eugen
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 5c9443a..00f0037 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -36,6 +36,7 @@
 #include riff.h
 #include libavcodec/bytestream.h
 #include libavcodec/exif.h
+#include libavformat/isom.h
 
 typedef struct AVIStream {
 int64_t frame_offset;   /* current frame (video) or byte (audio) counter
@@ -773,6 +774,12 @@ static int avi_read_header(AVFormatContext *s)
 st-codec-codec_tag  = tag1;
 st-codec-codec_id   = ff_codec_get_id(ff_codec_bmp_tags,
 tag1);
+if (!st-codec-codec_id) {
+st-codec-codec_id = 
ff_codec_get_id(ff_codec_movvideo_tags,
+  tag1);
+if (st-codec-codec_id)
+   av_log(s, AV_LOG_WARNING, mov tag found in avi\n);
+}
 /* This is needed to get the pict type which is necessary
  * for generating correct pts. */
 st-need_parsing = AVSTREAM_PARSE_HEADERS;
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 399523c..edc6347 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -362,8 +362,6 @@ const AVCodecTag ff_codec_bmp_tags[] = {
 { AV_CODEC_ID_G2M,  MKTAG('G', '2', 'M', '4') },
 { AV_CODEC_ID_G2M,  MKTAG('G', '2', 'M', '5') },
 { AV_CODEC_ID_FIC,  MKTAG('F', 'I', 'C', 'V') },
-{ AV_CODEC_ID_PRORES,   MKTAG('A', 'P', 'C', 'N') },
-{ AV_CODEC_ID_PRORES,   MKTAG('A', 'P', 'C', 'H') },
 { AV_CODEC_ID_QTRLE,MKTAG('r', 'l', 'e', ' ') },
 { AV_CODEC_ID_HQX,  MKTAG('C', 'H', 'Q', 'X') },
 { AV_CODEC_ID_NONE, 0 }
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Do not list mov codecs in riff.c

2015-03-12 Thread Carl Eugen Hoyos
On Friday 13 March 2015 02:36:00 am Carl Eugen Hoyos wrote:
 Hi!

 Attached patch fixes a regression caused by randomly added
 prores code-points in riff.c (similar to ticket #4307). As
 a side-effect, it shows a warning for such (probably
 invalid) files).

Updated patch attached.

Carl Eugen
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 5c9443a..00f0037 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -36,6 +36,7 @@
 #include riff.h
 #include libavcodec/bytestream.h
 #include libavcodec/exif.h
+#include libavformat/isom.h
 
 typedef struct AVIStream {
 int64_t frame_offset;   /* current frame (video) or byte (audio) counter
@@ -773,6 +774,12 @@ static int avi_read_header(AVFormatContext *s)
 st-codec-codec_tag  = tag1;
 st-codec-codec_id   = ff_codec_get_id(ff_codec_bmp_tags,
 tag1);
+if (!st-codec-codec_id) {
+st-codec-codec_id = 
ff_codec_get_id(ff_codec_movvideo_tags,
+  tag1);
+if (st-codec-codec_id)
+   av_log(s, AV_LOG_WARNING, mov tag found in avi\n);
+}
 /* This is needed to get the pict type which is necessary
  * for generating correct pts. */
 st-need_parsing = AVSTREAM_PARSE_HEADERS;
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 399523c..696b06b 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -362,9 +362,6 @@ const AVCodecTag ff_codec_bmp_tags[] = {
 { AV_CODEC_ID_G2M,  MKTAG('G', '2', 'M', '4') },
 { AV_CODEC_ID_G2M,  MKTAG('G', '2', 'M', '5') },
 { AV_CODEC_ID_FIC,  MKTAG('F', 'I', 'C', 'V') },
-{ AV_CODEC_ID_PRORES,   MKTAG('A', 'P', 'C', 'N') },
-{ AV_CODEC_ID_PRORES,   MKTAG('A', 'P', 'C', 'H') },
-{ AV_CODEC_ID_QTRLE,MKTAG('r', 'l', 'e', ' ') },
 { AV_CODEC_ID_HQX,  MKTAG('C', 'H', 'Q', 'X') },
 { AV_CODEC_ID_NONE, 0 }
 };
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel