]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '418693bdc5edad72b0d055f741931612d797eb05'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 23 Dec 2012 12:28:01 +0000 (13:28 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 23 Dec 2012 12:32:40 +0000 (13:32 +0100)
* commit '418693bdc5edad72b0d055f741931612d797eb05':
  lavc: rewrite and extend AVFrame doxy
  opt: avoid segfault in av_opt_next() if the class does not have an option list
  ttadec: fix last frame handling when seeking
  alacdec: do not be too strict about the extradata size

Conflicts:
libavcodec/alac.c
libavcodec/avcodec.h
libavcodec/tta.c
libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/alac.c
libavcodec/avcodec.h
libavcodec/tta.c
libavutil/opt.c

index 4e8903114d6289c2cb4f1aea3a56ec78a0b24a95,1a3f769513de55b82e422a59a1e59581c833ca1a..180ef53105d7dac0bedaebd9091b8bcfe0fbf615
@@@ -573,13 -521,12 +573,12 @@@ static av_cold int alac_decode_init(AVC
      alac->avctx = avctx;
  
      /* initialize from the extradata */
-     if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {
-         av_log(avctx, AV_LOG_ERROR, "expected %d extradata bytes\n",
-             ALAC_EXTRADATA_SIZE);
-         return -1;
+     if (alac->avctx->extradata_size < ALAC_EXTRADATA_SIZE) {
 -        av_log(avctx, AV_LOG_ERROR, "alac: extradata is too small\n");
++        av_log(avctx, AV_LOG_ERROR, "extradata is too small\n");
+         return AVERROR_INVALIDDATA;
      }
      if (alac_set_info(alac)) {
 -        av_log(avctx, AV_LOG_ERROR, "alac: set_info failed\n");
 +        av_log(avctx, AV_LOG_ERROR, "set_info failed\n");
          return -1;
      }
  
index 0241c8a96ba8d87865dfc80ba44ab07762753de4,d9a2dc2ce494eab8f987ffba8738ee889cfeef64..9ee9af131116f098f3edc78eca5c4bb990b60869
@@@ -1074,14 -972,19 +1074,22 @@@ enum AVSideDataParamChangeFlags 
   */
  
  /**
-  * Audio Video Frame.
-  * New fields can be added to the end of AVFRAME with minor version
-  * bumps. Similarly fields that are marked as to be only accessed by
+  * This structure describes decoded (raw) audio or video data.
+  *
+  * AVFrame must be allocated using avcodec_alloc_frame() and freed with
+  * avcodec_free_frame(). Note that this allocates only the AVFrame itself. The
+  * buffers for the data must be managed through other means.
+  *
+  * AVFrame is typically allocated once and then reused multiple times to hold
+  * different data (e.g. a single AVFrame to hold frames received from a
+  * decoder). In such a case, avcodec_get_frame_defaults() should be used to
+  * reset the frame to its original clean state before it is reused again.
+  *
+  * sizeof(AVFrame) is not a part of the public ABI, so new fields may be added
+  * to the end with a minor bump.
++ * Similarly fields that are marked as to be only accessed by
 + * av_opt_ptr() can be reordered. This allows 2 forks to add fields
 + * without breaking compatibility with each other.
-  * Removal, reordering and changes in the remaining cases require
-  * a major version bump.
-  * sizeof(AVFrame) must not be used outside libavcodec.
   */
  typedef struct AVFrame {
  #define AV_NUM_DATA_POINTERS 8
Simple merge
diff --cc libavutil/opt.c
Simple merge