Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 25 Sep 2012 14:11:34 +0000 (16:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 25 Sep 2012 14:11:34 +0000 (16:11 +0200)
* qatar/master:
  pthread: make sure AVFrame.extended_data is set properly.
  libfdk-aac: reindent after last commit
  libfdk-aac: Limit to supported sample rates.
  cbrt_tablegen: Include libm.h
  oggparsetheora: make it more robust
  ogg: prevent NULL pointer deference in theora gptopts

Conflicts:
libavformat/oggparsetheora.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/cbrt_tablegen.c
libavcodec/libfdk-aacenc.c
libavcodec/pthread.c
libavformat/oggparsetheora.c

Simple merge
Simple merge
@@@ -387,21 -377,20 +387,25 @@@ static attribute_align_arg void *frame_
          p->got_frame = 0;
          p->result = codec->decode(avctx, &p->frame, &p->got_frame, &p->avpkt);
  
+         /* many decoders assign whole AVFrames, thus overwriting extended_data;
+          * make sure it's set correctly */
+         p->frame.extended_data = p->frame.data;
          if (p->state == STATE_SETTING_UP) ff_thread_finish_setup(avctx);
  
 +        pthread_mutex_lock(&p->progress_mutex);
 +        for (i = 0; i < MAX_BUFFERS; i++)
 +            if (p->progress_used[i] && (p->got_frame || p->result<0 || avctx->codec_id != AV_CODEC_ID_H264)) {
 +                p->progress[i][0] = INT_MAX;
 +                p->progress[i][1] = INT_MAX;
 +            }
          p->state = STATE_INPUT_READY;
  
 -        pthread_mutex_lock(&p->progress_mutex);
 +        pthread_cond_broadcast(&p->progress_cond);
          pthread_cond_signal(&p->output_cond);
          pthread_mutex_unlock(&p->progress_mutex);
 -
 -        pthread_mutex_unlock(&p->mutex);
      }
 +    pthread_mutex_unlock(&p->mutex);
  
      return NULL;
  }
@@@ -109,9 -110,17 +110,16 @@@ theora_header (AVFormatContext * s, in
          st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
          st->codec->codec_id = AV_CODEC_ID_THEORA;
          st->need_parsing = AVSTREAM_PARSE_HEADERS;
--
-     } else if (os->buf[os->pstart] == 0x81) {
-         ff_vorbis_comment (s, &st->metadata, os->buf + os->pstart + 7, os->psize - 8);
+     }
+     break;
+     case 0x81:
+         ff_vorbis_comment(s, &st->metadata, os->buf + os->pstart + 7, os->psize - 8);
+     case 0x82:
+         if (!thp->version)
+             return -1;
+         break;
+     default:
+         return -1;
      }
  
      st->codec->extradata = av_realloc (st->codec->extradata,