Ticket #2335: 2335_fix_2.diff
File 2335_fix_2.diff, 2.2 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/avformatdecoder.cpp
713 714 { 714 715 readcontext.prot = &AVF_RingBuffer_Protocol; 715 716 readcontext.flags = 0; 716 readcontext.is_streamed = 0; 717 if (ringBuffer->LiveMode() || recordingHasPositionMap) 718 readcontext.is_streamed = 1; 719 else 720 readcontext.is_streamed = 0; 717 721 readcontext.max_packet_size = 0; 718 722 readcontext.priv_data = avfRingBuffer; 719 723 … … 733 737 ic->pb.pos = 0; 734 738 ic->pb.must_flush = 0; 735 739 ic->pb.eof_reached = 0; 736 if (ringBuffer->isDVD()) 740 if (ringBuffer->isDVD() || ringBuffer->LiveMode() || 741 recordingHasPositionMap) 737 742 ic->pb.is_streamed = 1; 738 else 743 else 739 744 ic->pb.is_streamed = 0; 740 745 ic->pb.max_packet_size = 0; 741 746 } … … 802 807 return -1; 803 808 } 804 809 810 // Try to get a position map from the recorder if we don't have one yet. 811 // We need to do this before InitByteContext() because we enable 812 // is_streamed based on the presence of a posmap. 813 if (!recordingHasPositionMap) 814 { 815 if ((m_playbackinfo) || livetv || watchingrecording) 816 { 817 recordingHasPositionMap |= SyncPositionMap(); 818 if (recordingHasPositionMap && !livetv && !watchingrecording) 819 { 820 hasFullPositionMap = true; 821 gopset = true; 822 } 823 } 824 } 825 805 826 InitByteContext(); 806 827 807 828 int err = av_open_input_file(&ic, filename, fmt, 0, ¶ms); … … 863 884 SetVideoByComponentTag(initialVideo); 864 885 } 865 886 866 // Try to get a position map from the recorder if we don't have one yet.867 if (!recordingHasPositionMap)868 {869 if ((m_playbackinfo) || livetv || watchingrecording)870 {871 recordingHasPositionMap |= SyncPositionMap();872 if (recordingHasPositionMap && !livetv && !watchingrecording)873 {874 hasFullPositionMap = true;875 gopset = true;876 }877 }878 }879 880 887 // If we don't have a position map, set up ffmpeg for seeking 881 888 if (!recordingHasPositionMap) 882 889 {