Merge commit '139f352daf84e005824562e0e0f36e06ac60ee36' into release/0.10

* commit '139f352daf84e005824562e0e0f36e06ac60ee36':
  wtv: Mark attachment with a negative stream id
  avidec: Let the inner dv demuxer take care of discarding

Conflicts:
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-09-14 10:26:56 +02:00
2 changed files with 7 additions and 3 deletions

View File

@@ -980,9 +980,12 @@ start_sync:
} }
if( (st->discard >= AVDISCARD_DEFAULT && size==0) if (!avi->dv_demux &&
/*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering ((st->discard >= AVDISCARD_DEFAULT && size==0) /* ||
|| st->discard >= AVDISCARD_ALL){ //FIXME needs a little reordering
(st->discard >= AVDISCARD_NONKEY &&
!(pkt->flags & AV_PKT_FLAG_KEY)) */
|| st->discard >= AVDISCARD_ALL)) {
if (!exit_early) { if (!exit_early) {
ast->frame_offset += get_duration(ast, size); ast->frame_offset += get_duration(ast, size);
avio_skip(pb, size); avio_skip(pb, size);

View File

@@ -423,6 +423,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
st->codec->codec_id = CODEC_ID_MJPEG; st->codec->codec_id = CODEC_ID_MJPEG;
st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT; st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
st->codec->extradata = av_mallocz(filesize); st->codec->extradata = av_mallocz(filesize);
st->id = -1;
if (!st->codec->extradata) if (!st->codec->extradata)
goto done; goto done;
st->codec->extradata_size = filesize; st->codec->extradata_size = filesize;