Commit b84ce38
committed
applications/voipstream: Update deprecated FFmpeg API calls with version guards
Modernized FFmpeg API usage in the voipstream application to support
both legacy and current FFmpeg versions while eliminating deprecation
warnings on newer versions.
Changes:
- Added version guards for avcodec_close() calls (deprecated since
FFmpeg 3.1/libavcodec 58). The function is now only called for
older FFmpeg versions, as avcodec_free_context() automatically
closes the codec in newer versions.
- Updated sample format retrieval in VoipStreamSender to handle the
deprecated 'sample_fmts' field (deprecated since FFmpeg 6.1). The
code now uses the legacy field for FFmpeg < 6.1 and the new
avcodec_get_supported_config() API for FFmpeg >= 6.1.1 parent 70a78f7 commit b84ce38
3 files changed
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
| 210 | + | |
| 211 | + | |
208 | 212 | | |
209 | 213 | | |
210 | 214 | | |
| |||
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
228 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
230 | 232 | | |
| 233 | + | |
| 234 | + | |
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| |||
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
287 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
| 191 | + | |
| 192 | + | |
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
| |||
252 | 260 | | |
253 | 261 | | |
254 | 262 | | |
| 263 | + | |
| 264 | + | |
255 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
256 | 279 | | |
257 | 280 | | |
258 | 281 | | |
| |||
571 | 594 | | |
572 | 595 | | |
573 | 596 | | |
574 | | - | |
| |||
0 commit comments