On 01/01/15 18:49, Anton Khirnov wrote:
We should not create invalid files unless the user really wants them.
---
  libavformat/matroskaenc.c | 20 +++++++++++++++-----
  1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 1d55b66..38f0863 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -520,8 +520,8 @@ static int put_flac_codecpriv(AVFormatContext *s,
      return 0;
  }

-static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec,
-                                 int *sample_rate, int *output_sample_rate)
+static int get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec,
+                                int *sample_rate, int *output_sample_rate)
  {
      MPEG4AudioConfig mp4ac;

@@ -529,11 +529,18 @@ static void get_aac_sample_rates(AVFormatContext *s, 
AVCodecContext *codec,
                                       codec->extradata_size * 8, 1) < 0) {
          av_log(s, AV_LOG_WARNING,
                 "Error parsing AAC extradata, unable to determine 
samplerate.\n");
-        return;
+        if (s->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) {
+            av_log(s, AV_LOG_ERROR,
+                   "Use a strict_std_compliance setting of 'unofficial' or "

That maps to -f_strict, the user couldn't see where to put the option in the documentation.

Probably would make sense to use the struct field and put in the manpage a "this maps to that".

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to