mirror of https://github.com/mpv-player/mpv
removed unused definition of insertRTPData(); it's not only unused,
but conceptually wrong as it passed extradata as first demux_packet to the corresponding demux_stream. Patch by Carl Eugen Hoyos git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22472 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4fadeb9c2b
commit
f6687e7a78
|
@ -325,34 +325,6 @@ Boolean awaitRTPPacket(demuxer_t* demuxer, demux_stream_t* ds,
|
|||
return True;
|
||||
}
|
||||
|
||||
Boolean insertRTPData(demuxer_t* demuxer, demux_stream_t* ds,
|
||||
unsigned char* data, unsigned dataLen) {
|
||||
// Begin by finding the buffer queue that we want to add data to.
|
||||
// (Get this from the RTP state, which we stored in
|
||||
// the demuxer's 'priv' field)
|
||||
RTPState* rtpState = (RTPState*)(demuxer->priv);
|
||||
ReadBufferQueue* bufferQueue = NULL;
|
||||
if (ds == demuxer->video) {
|
||||
bufferQueue = rtpState->videoBufferQueue;
|
||||
} else if (ds == demuxer->audio) {
|
||||
bufferQueue = rtpState->audioBufferQueue;
|
||||
} else {
|
||||
fprintf(stderr, "(demux_rtp)insertRTPData: internal error: unknown stream\n");
|
||||
return False;
|
||||
}
|
||||
|
||||
if (data == NULL || dataLen == 0) return False;
|
||||
|
||||
demux_packet_t* dp = new_demux_packet(dataLen);
|
||||
if (dp == NULL) return False;
|
||||
|
||||
// Copy our data into the buffer, and save it:
|
||||
memmove(dp->buffer, data, dataLen);
|
||||
dp->pts = 0;
|
||||
bufferQueue->savePendingBuffer(dp);
|
||||
return True;
|
||||
}
|
||||
|
||||
static void teardownRTSPorSIPSession(RTPState* rtpState); // forward
|
||||
|
||||
extern "C" void demux_close_rtp(demuxer_t* demuxer) {
|
||||
|
|
|
@ -36,8 +36,4 @@ Boolean awaitRTPPacket(demuxer_t* demuxer, demux_stream_t* ds,
|
|||
// "streamType": 0 => video; 1 => audio
|
||||
// This routine returns False if the input stream has closed
|
||||
|
||||
// A routine for adding our own data to an incoming RTP data stream:
|
||||
Boolean insertRTPData(demuxer_t* demuxer, demux_stream_t* ds,
|
||||
unsigned char* data, unsigned dataLen);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue