Index: media/filters/legacy_frame_processor.cc |
diff --git a/media/filters/legacy_frame_processor.cc b/media/filters/legacy_frame_processor.cc |
index 71c280183f2d2f74026d89dae8074f23737c5c44..201f2f3f6ab2ef7c14d70d02b4d144d4d83241c5 100644 |
--- a/media/filters/legacy_frame_processor.cc |
+++ b/media/filters/legacy_frame_processor.cc |
@@ -213,6 +213,12 @@ void LegacyFrameProcessor::FilterWithAppendWindow( |
buffer->SetDecodeTimestamp(append_window_start); |
buffer->set_duration(frame_end_timestamp - append_window_start); |
+ // If this isn't the first buffer discarded by the append window, pull |
+ // in the buffer immediately preceding this one for preroll. This |
+ // ensures that the partially trimmed buffer can be correctly decoded. |
+ if (itr != buffers.begin()) |
acolwell GONE FROM CHROMIUM
2014/05/16 17:01:11
This looks like it would only work if both buffers
DaleCurtis
2014/05/16 17:48:59
Hmm, since buffers outside the append window are l
acolwell GONE FROM CHROMIUM
2014/05/16 20:26:05
If that is what is necessary. Appending 1 byte at
DaleCurtis
2014/05/22 23:58:57
Done.
|
+ buffer->SetPrerollBuffer(*(itr - 1)); |
+ |
// TODO(dalecurtis): This could also be done with |append_window_end|, |
// but is not necessary since splice frames cover the overlap there. |
} else { |