Merge commit '9f30fb5a773d59298d8d45c741b3fd971d84c97b'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 29 May 2013 09:06:26 +0000 (11:06 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 29 May 2013 09:06:26 +0000 (11:06 +0200)
* commit '9f30fb5a773d59298d8d45c741b3fd971d84c97b':
  configure: Don't pass -mthumb or -march= to MSVC
  mpeg12: skip frames consistently

Conflicts:
libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
configure
libavcodec/mpeg12dec.c

diff --cc configure
Simple merge
@@@ -2121,18 -2059,16 +2121,18 @@@ static int decode_chunks(AVCodecContex
      const uint8_t *buf_ptr = buf;
      const uint8_t *buf_end = buf + buf_size;
      int ret, input_size;
-     int last_code = 0;
+     int last_code = 0, skip_frame = 0;
 +    int picture_start_code_seen = 0;
  
      for (;;) {
          /* find next start code */
          uint32_t start_code = -1;
          buf_ptr = avpriv_find_start_code(buf_ptr, buf_end, &start_code);
          if (start_code > 0x1ff) {
-             if (s2->pict_type != AV_PICTURE_TYPE_B || avctx->skip_frame <= AVDISCARD_DEFAULT) {
+             if (!skip_frame) {
                  if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)) {
                      int i;
 +                    av_assert0(avctx->thread_count > 1);
  
                      avctx->execute(avctx, slice_decode_thread,  &s2->thread_context[0], NULL, s->slice_count, sizeof(void*));
                      for (i = 0; i < s->slice_count; i++)
                  if (s2->last_picture_ptr == NULL) {
                  /* Skip B-frames if we do not have reference frames and gop is not closed */
                      if (s2->pict_type == AV_PICTURE_TYPE_B) {
-                         if (!s2->closed_gop)
 -                        if (!s->closed_gop) {
++                        if (!s2->closed_gop) {
+                             skip_frame = 1;
                              break;
+                         }
                      }
                  }
 -                if (s2->pict_type == AV_PICTURE_TYPE_I)
 +                if (s2->pict_type == AV_PICTURE_TYPE_I || (s2->flags2 & CODEC_FLAG2_SHOW_ALL))
                      s->sync=1;
                  if (s2->next_picture_ptr == NULL) {
                  /* Skip P-frames if we do not have a reference frame or we have an invalid header. */