Browse Source

Remove some useless code that duplicates av_get_packet.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tags/n0.11
Reimar Döffinger 13 years ago
parent
commit
8f63f241d4
8 changed files with 6 additions and 33 deletions
  1. +0
    -4
      libavformat/au.c
  2. +0
    -3
      libavformat/flvdec.c
  3. +0
    -1
      libavformat/gsmdec.c
  4. +3
    -10
      libavformat/ingenientdec.c
  5. +3
    -7
      libavformat/mmf.c
  6. +0
    -3
      libavformat/rsodec.c
  7. +0
    -4
      libavformat/sol.c
  8. +0
    -1
      libavformat/soxdec.c

+ 0
- 4
libavformat/au.c View File

@@ -189,10 +189,6 @@ static int au_read_packet(AVFormatContext *s,
return ret;
pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
pkt->stream_index = 0;

/* note: we need to modify the packet size here to handle the last
packet */
pkt->size = ret;
return 0;
}



+ 0
- 3
libavformat/flvdec.c View File

@@ -656,9 +656,6 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0) {
return AVERROR(EIO);
}
/* note: we need to modify the packet size here to handle the last
packet */
pkt->size = ret;
pkt->dts = dts;
pkt->pts = pts == AV_NOPTS_VALUE ? dts : pts;
pkt->stream_index = st->index;


+ 0
- 1
libavformat/gsmdec.c View File

@@ -47,7 +47,6 @@ static int gsm_read_packet(AVFormatContext *s, AVPacket *pkt)
av_free_packet(pkt);
return ret < 0 ? ret : AVERROR(EIO);
}
pkt->size = ret;
pkt->duration = 1;
pkt->pts = pkt->pos / GSM_BLOCK_SIZE;



+ 3
- 10
libavformat/ingenientdec.c View File

@@ -44,17 +44,10 @@ static int ingenient_read_packet(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_DEBUG, "Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n",
size, w, h, unk1, unk2);

if (av_new_packet(pkt, size) < 0)
return AVERROR(ENOMEM);

pkt->pos = avio_tell(s->pb);
pkt->stream_index = 0;
ret = avio_read(s->pb, pkt->data, size);
if (ret < 0) {
av_free_packet(pkt);
ret = av_get_packet(s->pb, pkt, size);
if (ret < 0)
return ret;
}
pkt->size = ret;
pkt->stream_index = 0;
return ret;
}



+ 3
- 7
libavformat/mmf.c View File

@@ -275,17 +275,13 @@ static int mmf_read_packet(AVFormatContext *s,
if(!size)
return AVERROR(EIO);

if (av_new_packet(pkt, size))
return AVERROR(EIO);
pkt->stream_index = 0;

ret = avio_read(s->pb, pkt->data, pkt->size);
ret = av_get_packet(s->pb, pkt, size);
if (ret < 0)
av_free_packet(pkt);
return ret;

pkt->stream_index = 0;
mmf->data_size -= ret;

pkt->size = ret;
return ret;
}



+ 0
- 3
libavformat/rsodec.c View File

@@ -83,9 +83,6 @@ static int rso_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
pkt->stream_index = 0;

/* note: we need to modify the packet size here to handle the last packet */
pkt->size = ret;

return 0;
}



+ 0
- 4
libavformat/sol.c View File

@@ -135,10 +135,6 @@ static int sol_read_packet(AVFormatContext *s,
return ret;
pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
pkt->stream_index = 0;

/* note: we need to modify the packet size here to handle the last
packet */
pkt->size = ret;
return 0;
}



+ 0
- 1
libavformat/soxdec.c View File

@@ -140,7 +140,6 @@ static int sox_read_packet(AVFormatContext *s,
return AVERROR(EIO);
pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
pkt->stream_index = 0;
pkt->size = ret;

return 0;
}


Loading…
Cancel
Save