mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Add audio_pkt_cnt return value to ff_rm_retrieve_cache(). See discussion in
"[PATCH] oops I broke rdt.c" mailinglist thread. Originally committed as revision 16368 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5d88c2647d
commit
a9f84821c5
@ -315,6 +315,7 @@ rdt_parse_packet (PayloadContext *rdt, AVStream *st,
|
|||||||
NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
rdt->audio_pkt_cnt =
|
||||||
ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb, st, rdt->rmst[0], pkt);
|
ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb, st, rdt->rmst[0], pkt);
|
||||||
if (rdt->audio_pkt_cnt == 0 &&
|
if (rdt->audio_pkt_cnt == 0 &&
|
||||||
st->codec->codec_id == CODEC_ID_AAC)
|
st->codec->codec_id == CODEC_ID_AAC)
|
||||||
|
@ -83,8 +83,10 @@ int ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb,
|
|||||||
* @param st stream that this packet belongs to
|
* @param st stream that this packet belongs to
|
||||||
* @param rst Real-specific stream information
|
* @param rst Real-specific stream information
|
||||||
* @param pkt location to store the packet data
|
* @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);
|
AVStream *st, RMStream *rst, AVPacket *pkt);
|
||||||
|
|
||||||
#endif /* AVFORMAT_RM_H */
|
#endif /* AVFORMAT_RM_H */
|
||||||
|
@ -681,7 +681,7 @@ ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb,
|
|||||||
return st->codec->codec_type == CODEC_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
|
return st->codec->codec_type == CODEC_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
ff_rm_retrieve_cache (AVFormatContext *s, ByteIOContext *pb,
|
ff_rm_retrieve_cache (AVFormatContext *s, ByteIOContext *pb,
|
||||||
AVStream *st, RMStream *ast, AVPacket *pkt)
|
AVStream *st, RMStream *ast, AVPacket *pkt)
|
||||||
{
|
{
|
||||||
@ -700,6 +700,8 @@ ff_rm_retrieve_cache (AVFormatContext *s, ByteIOContext *pb,
|
|||||||
rm->audio_pkt_cnt--;
|
rm->audio_pkt_cnt--;
|
||||||
pkt->flags = 0;
|
pkt->flags = 0;
|
||||||
pkt->stream_index = st->index;
|
pkt->stream_index = st->index;
|
||||||
|
|
||||||
|
return rm->audio_pkt_cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
|
static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
|
Loading…
Reference in New Issue
Block a user