Ticket #2335: 2335_fix_3.diff
File 2335_fix_3.diff, 2.3 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/avformatdecoder.cpp
745 745 746 746 void AvFormatDecoder::InitByteContext(void) 747 747 { 748 int streamed = 0; 749 if (ringBuffer->isDVD() || (ringBuffer->LiveMode() && recordingHasPositionMap)) 750 streamed = 1; 751 748 752 readcontext.prot = &AVF_RingBuffer_Protocol; 749 753 readcontext.flags = 0; 750 readcontext.is_streamed = 0;754 readcontext.is_streamed = streamed; 751 755 readcontext.max_packet_size = 0; 752 756 readcontext.priv_data = avfRingBuffer; 753 757 … … 767 771 ic->pb.pos = 0; 768 772 ic->pb.must_flush = 0; 769 773 ic->pb.eof_reached = 0; 770 if (ringBuffer->isDVD()) 771 ic->pb.is_streamed = 1; 772 else 773 ic->pb.is_streamed = 0; 774 ic->pb.is_streamed = streamed; 774 775 ic->pb.max_packet_size = 0; 775 776 } 776 777 … … 836 837 return -1; 837 838 } 838 839 840 // Try to get a position map from the recorder if we don't have one yet. 841 // We need to do this before InitByteContext() because we enable 842 // is_streamed based on the presence of a posmap. 843 if (!recordingHasPositionMap) 844 { 845 if ((m_playbackinfo) || livetv || watchingrecording) 846 { 847 recordingHasPositionMap |= SyncPositionMap(); 848 if (recordingHasPositionMap && !livetv && !watchingrecording) 849 { 850 hasFullPositionMap = true; 851 gopset = true; 852 } 853 } 854 } 855 839 856 InitByteContext(); 840 857 841 858 int err = av_open_input_file(&ic, filename, fmt, 0, ¶ms); … … 897 914 SetVideoByComponentTag(initialVideo); 898 915 } 899 916 900 // Try to get a position map from the recorder if we don't have one yet.901 if (!recordingHasPositionMap)902 {903 if ((m_playbackinfo) || livetv || watchingrecording)904 {905 recordingHasPositionMap |= SyncPositionMap();906 if (recordingHasPositionMap && !livetv && !watchingrecording)907 {908 hasFullPositionMap = true;909 gopset = true;910 }911 }912 }913 914 917 // If we don't have a position map, set up ffmpeg for seeking 915 918 if (!recordingHasPositionMap) 916 919 {