diff options
Diffstat (limited to 'media-plugins/vdr-softdevice/files/patches-0.4.0/stream-repacker.diff')
-rw-r--r-- | media-plugins/vdr-softdevice/files/patches-0.4.0/stream-repacker.diff | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/media-plugins/vdr-softdevice/files/patches-0.4.0/stream-repacker.diff b/media-plugins/vdr-softdevice/files/patches-0.4.0/stream-repacker.diff deleted file mode 100644 index cec716a4336c..000000000000 --- a/media-plugins/vdr-softdevice/files/patches-0.4.0/stream-repacker.diff +++ /dev/null @@ -1,67 +0,0 @@ -Index: softdevice-cvs/mpeg2decoder.c -=================================================================== ---- softdevice-cvs.orig/mpeg2decoder.c -+++ softdevice-cvs/mpeg2decoder.c -@@ -174,7 +174,7 @@ void cStreamDecoder::Action() - freezeMode=false; - AVPacket *pkt; - -- while ( PacketQueue.Available() < 7 && active) { -+ while ( PacketQueue.Available() < 3 && active) { - BUFDEB("wait while loop packets %d StreamDecoder pid:%d type %d\n", - PacketQueue.Available(),getpid(),context->codec_type ); - usleep(10000); -@@ -1124,20 +1124,31 @@ void cMpeg2Decoder::Action() - usleep(50000); - - BUFDEB("av_read_frame start\n"); -- //ret = av_read_frame(ic, &pkt); -- ret = av_read_packet(ic, &pkt); -+ ret = av_read_frame(ic, &pkt); -+ //ret = av_read_packet(ic, &pkt); - if (ret < 0) { - BUFDEB("cMpeg2Decoder Stream Error!\n"); - if (ThreadActive) - usleep(10000); - continue; - } -- //av_dup_packet(&pkt); -+ av_dup_packet(&pkt); - PacketCount++; - BUFDEB("got packet from av_read_frame!\n"); - -+#if LIBAVFORMAT_BUILD > 4623 -+ AVRational time_base; -+ time_base=ic->streams[pkt.stream_index]->time_base; -+ if ( pkt.pts != (int64_t) AV_NOPTS_VALUE ) { -+ pkt.pts=av_rescale(pkt.pts, AV_TIME_BASE* (int64_t)time_base.num, time_base.den)/100 ; -+ }; -+ -+ //printf("PTS: %lld new %lld num %d den %d\n",PTS,pkt.pts, -+ // time_base.num,time_base.den); -+#else - if ( pkt.pts != (int64_t) AV_NOPTS_VALUE ) - pkt.pts/=9; -+#endif - - QueuePacket(ic,pkt,packetMode); - -@@ -1193,9 +1204,6 @@ void cMpeg2Decoder::ResetDecoder(int Str - void cMpeg2Decoder::QueuePacket(const AVFormatContext *ic, AVPacket &pkt, - bool PacketMode) - { -- BUFDEB("QueuePacket AudioIdx: %d VideoIdx %d pkt.stream_index: %d\n", -- AudioIdx,VideoIdx,pkt.stream_index); -- - if (!ic) { - fprintf(stderr,"Error: ic is null!\n"); - av_free_packet(&pkt); -@@ -1221,6 +1229,8 @@ void cMpeg2Decoder::QueuePacket(const AV - BUFDEB("Unknown packet type! Return;\n"); - return; - }; -+ BUFDEB("QueuePacket AudioIdx: %d VideoIdx %d pkt.stream_index: %d, packet_type: %d\n", -+ AudioIdx,VideoIdx,pkt.stream_index,packet_type); - - // check if there are new streams - if ( AudioIdx != DONT_PLAY && packet_type == CODEC_TYPE_AUDIO |