NULL, NULL, NULL, NULL);
}
} else {
+ rdt->audio_pkt_cnt =
ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb, st, rdt->rmst[0], pkt);
if (rdt->audio_pkt_cnt == 0 &&
st->codec->codec_id == CODEC_ID_AAC)
* @param st stream that this packet belongs to
* @param rst Real-specific stream information
* @param pkt location to store the packet data
+ * @returns the number of samples left for subsequent calls to this same
+ * function, or 0 if all samples have been retrieved.
*/
-void ff_rm_retrieve_cache (AVFormatContext *s, ByteIOContext *pb,
+int ff_rm_retrieve_cache (AVFormatContext *s, ByteIOContext *pb,
AVStream *st, RMStream *rst, AVPacket *pkt);
#endif /* AVFORMAT_RM_H */
return st->codec->codec_type == CODEC_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
}
-void
+int
ff_rm_retrieve_cache (AVFormatContext *s, ByteIOContext *pb,
AVStream *st, RMStream *ast, AVPacket *pkt)
{
rm->audio_pkt_cnt--;
pkt->flags = 0;
pkt->stream_index = st->index;
+
+ return rm->audio_pkt_cnt;
}
static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)