Fix flaky test TestFlexfecRtpStatePreservation.
Videosendstream can be created before capturer starts, so initially the frame resolution may be zero. Add a check to prevent test failure and undesired behavior.
Bug: webrtc:7737
Change-Id: I8f4402e866f45ea1eb112437f866170691a111f6
Reviewed-on: https://webrtc-review.googlesource.com/95102
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24404}
diff --git a/modules/video_coding/media_opt_util.cc b/modules/video_coding/media_opt_util.cc
index 125e6db..436cb0f 100644
--- a/modules/video_coding/media_opt_util.cc
+++ b/modules/video_coding/media_opt_util.cc
@@ -505,8 +505,8 @@
_shortMaxLossPr255(0),
_packetsPerFrame(0.9999f),
_packetsPerFrameKey(0.9999f),
- _codecWidth(0),
- _codecHeight(0),
+ _codecWidth(704),
+ _codecHeight(576),
_numLayers(1) {
Reset(nowMs);
}