Merge commit 'c8f0b20b4a6bb6691928789d83e4b02896969848'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 28 Jul 2013 11:13:47 +0000 (13:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 28 Jul 2013 11:15:21 +0000 (13:15 +0200)
* commit 'c8f0b20b4a6bb6691928789d83e4b02896969848':
  avidec: Let the inner dv demuxer take care of discarding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/avidec.c

@@@ -1084,14 -984,17 +1084,17 @@@ start_sync
                  }
              }
  
-             if ((st->discard >= AVDISCARD_DEFAULT && size == 0)
-                 /* || (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY)) */ // FIXME: needs a little reordering
-                 || st->discard >= AVDISCARD_ALL) {
+             if (!avi->dv_demux &&
+                 ((st->discard >= AVDISCARD_DEFAULT && size == 0) /* ||
+                  // FIXME: needs a little reordering
+                  (st->discard >= AVDISCARD_NONKEY &&
+                  !(pkt->flags & AV_PKT_FLAG_KEY)) */
+                 || st->discard >= AVDISCARD_ALL)) {
                  if (!exit_early) {
                      ast->frame_offset += get_duration(ast, size);
 +                    avio_skip(pb, size);
 +                    goto start_sync;
                  }
 -                avio_skip(pb, size);
 -                goto start_sync;
              }
  
              if (d[2] == 'p' && d[3] == 'c' && size <= 4 * 256 + 4) {