| 200 | } |
| 201 | |
| 202 | void AVFrameWrapper::update() |
| 203 | { |
| 204 | if (this->frame == nullptr) |
| 205 | return; |
| 206 | |
| 207 | if (this->libVer.avutil.major == 54) |
| 208 | { |
| 209 | auto p = reinterpret_cast<AVFrame_54 *>(this->frame); |
| 210 | for (unsigned i = 0; i < AV_NUM_DATA_POINTERS; i++) |
| 211 | { |
| 212 | this->data[i] = p->data[i]; |
| 213 | this->linesize[i] = p->linesize[i]; |
| 214 | } |
| 215 | this->width = p->width; |
| 216 | this->height = p->height; |
| 217 | this->nb_samples = p->nb_samples; |
| 218 | this->format = p->format; |
| 219 | this->key_frame = p->key_frame; |
| 220 | this->pict_type = p->pict_type; |
| 221 | this->sample_aspect_ratio = p->sample_aspect_ratio; |
| 222 | this->pts = p->pts; |
| 223 | this->pkt_pts = p->pkt_pts; |
| 224 | this->pkt_dts = p->pkt_dts; |
| 225 | this->coded_picture_number = p->coded_picture_number; |
| 226 | this->display_picture_number = p->display_picture_number; |
| 227 | this->quality = p->quality; |
| 228 | } |
| 229 | else if (this->libVer.avutil.major == 55 || // |
| 230 | this->libVer.avutil.major == 56) |
| 231 | { |
| 232 | auto p = reinterpret_cast<AVFrame_55_56 *>(this->frame); |
| 233 | for (unsigned i = 0; i < AV_NUM_DATA_POINTERS; i++) |
| 234 | { |
| 235 | this->data[i] = p->data[i]; |
| 236 | this->linesize[i] = p->linesize[i]; |
| 237 | } |
| 238 | this->width = p->width; |
| 239 | this->height = p->height; |
| 240 | this->nb_samples = p->nb_samples; |
| 241 | this->format = p->format; |
| 242 | this->key_frame = p->key_frame; |
| 243 | this->pict_type = p->pict_type; |
| 244 | this->sample_aspect_ratio = p->sample_aspect_ratio; |
| 245 | this->pts = p->pts; |
| 246 | this->pkt_pts = p->pkt_pts; |
| 247 | this->pkt_dts = p->pkt_dts; |
| 248 | this->coded_picture_number = p->coded_picture_number; |
| 249 | this->display_picture_number = p->display_picture_number; |
| 250 | this->quality = p->quality; |
| 251 | } |
| 252 | else if (this->libVer.avutil.major == 57 || // |
| 253 | this->libVer.avutil.major == 58) |
| 254 | { |
| 255 | auto p = reinterpret_cast<AVFrame_57_58 *>(this->frame); |
| 256 | for (unsigned i = 0; i < AV_NUM_DATA_POINTERS; i++) |
| 257 | { |
| 258 | this->data[i] = p->data[i]; |
| 259 | this->linesize[i] = p->linesize[i]; |
no outgoing calls
no test coverage detected